Reputation: 13366
Just added the T4MVC templates to my project, built and then tried to use the cool new features it introduces.
I tried to update RedirectToAction("NotFound", "Error");
to RedirectToAction(MVC.Error.NotFound);
I get the following error at build:
Argument 1: cannot convert from 'method group' to 'System.Web.Mvc.ActionResult'
Also, in my views, when I try to do something like this: <%= Url.Action(MVC.Home.Index) %>
I get messages that say:
argument type 'method group' is not assignable to parameter type 'System.Web.Mvc.ActionResult'
Not really sure where to begin troubleshooting this.
Upvotes: 0
Views: 394
Reputation: 43193
You need to call it like the action method. e.g. MVC.Error.NotFound(). See the doc for more examples.
Upvotes: 1