public ActionResult Destroy([DataSourceRequest] DataSourceRequest request, ViewModel model) { if (model != null) // && ModelState.IsValid { this.data.Users.Delete(model.Id); this.data.SaveChanges(); } return(this.GridOperation(model, request)); }
public ActionResult Create([DataSourceRequest] DataSourceRequest request, ViewModel model) { var dbModel = base.Create <Model>(model); if (dbModel != null) { model.Id = dbModel.Id; } return(this.GridOperation(model, request)); }
public ActionResult Update([DataSourceRequest] DataSourceRequest request, ViewModel model) { base.Update <Model, ViewModel>(model, model.Id); return(this.GridOperation(model, request)); }