public GridCreateActionCommandBuilder <T> Create(string createAction = GridParameters.CreateMethod) { var routeValues = Context.GetRouteValueDictionary(createAction, false); var command = new GridCreateActionCommand <T>(Context, GridClass.IconAdd, GridParameters.Create, routeValues, null); ToolBar.Commands.Add(command); return(new GridCreateActionCommandBuilder <T>(command)); }
public GridCreateActionCommandBuilder <T> Create <TController>(Expression <Action <TController> > actionResult) where TController : Controller { var routeValues = MvcExpressionHelper.GetRouteValuesFromExpression(actionResult); var command = new GridCreateActionCommand <T>(Context, GridClass.IconAdd, GridParameters.Create, routeValues, null); ToolBar.Commands.Add(command); return(new GridCreateActionCommandBuilder <T>(command)); }