public JsonResult Delete(PlaceActionModel model) { JsonResult json = new JsonResult(); var result = false; var place = placeService.GetPlaceID(model.ID); result = placeService.DeletePlace(place); if (result) { json.Data = new { Success = true }; TempData["message"] = string.Format("Запись \"{0}\" была удален", place.Name); } else { json.Data = new { Success = false, Message = "Ошибка" }; } return(json); }