public JsonResult GetCatalogData(DataTableFilter dtFilter, CatalogFilter filter) { var data = DTOCatalog.MapToDTO(new CatalogRepository().GetData(dtFilter, filter)); return(Json(new { recordsTotal = data.Count, recordsFiltered = data.Count, data = data.Data }, JsonRequestBehavior.AllowGet)); }
public JsonResult GetCatalog(int id) { var data = DTOCatalog.MapToDTO(new CatalogRepository().GetIndividual(id)); return(Json(data)); }