public async Task <ActionResult> UpdateGalleryCategory(OutModels.Models.GalleryCategory cat) { try { GalleryCategoryModel pcm = (GalleryCategoryModel)_mapper.Map <OutModels.Models.GalleryCategory, GalleryCategoryModel>(cat); return(new JsonResult(await this._repository.Update(pcm))); } catch (Exception ex) { return(null); } }
public JsonResult SaveGalleryCategory(GalleryCategoryModel model) { tbl_GalleryCategory category = GalleryService.SaveGalleryCategory(model.Title, model.GalleryCategoryID); return Json((category != null) ? new { success = true, galleryCategoryID = category.GalleryCategoryID } : new { success = false, galleryCategoryID = 0 } ); }