Optional query string parameters in ASP.NET Web API

This issue has been fixed in the regular release of MVC4.
Now you can do:

public string GetFindBooks(string author="", string title="", string isbn="", string  somethingelse="", DateTime? date= null) 
{
    // ...
}

and everything will work out of the box.

Leave a Comment