I have a basic controller that takes a couple of generics, nothing more.
public class SystemBaseController<TForm, TFormViewModel> : Controller
where TForm : class, IForm
where TFormViewModel : class, IViewModel
OK, never mind. I have a method "CompleteForm" that takes in viewModel, looks like this ...
public ActionResult CompleteForm(TFormViewModel viewModel)
{
return this.RedirectToAction(c => c.FormInfo(viewModel));
}
The problem is that the controller that inherits this in this way
public class SalesFormController : SystemBaseController<SalesForm, SalesViewModel>
{ }
I am getting an error from MvcContrib. The name of the controller should end on "Controller" at this point ...
public RedirectToRouteResult(Expression<Action<T>> expression)
: this(expression, expr => Microsoft.Web.Mvc.Internal.ExpressionHelper.GetRouteValuesFromExpression(expr)) {}
The correct expression is (SystemBaseController blahblah), but I'm not sure why its 1.) saying that there is no controller at the end, and 2.) if I pulled everything into the controller (from the database), it works just fine. Do I need to write or configure some kind of custom action filter or what am I missing?