Reputation: 11682
It's Monday. Calling GET
on this action with no parameters in the querystring. The input model is coming up not null. Should it not be null? Or is something else going on and I'm not awake yet?
public ActionResult Report(VariancesReportForm form)
{
if (form == null)
return View();
Upvotes: 0
Views: 109
Reputation: 1039268
Should it not be null?
No, it shouldn't. The default model binder instantiates the parameter. Then it binds its properties. But since there weren't any query string parameters all the properties will be null.
Upvotes: 2