Пример #1
0
        public ActionResult Destroy([DataSourceRequest] DataSourceRequest request, FinalTempViewModel item)
        {
            if (item != null)
            {
                repo.Destroy(item);
            }

            return(Json(new[] { item }.ToDataSourceResult(request, ModelState)));
        }
Пример #2
0
        public ActionResult Update([DataSourceRequest] DataSourceRequest request, FinalTempViewModel item)
        {
            if (item != null && ModelState.IsValid)
            {
                repo.Update(item);
            }

            return(Json(new[] { item }.ToDataSourceResult(request, ModelState)));
        }