public JsonResult Save(UnitVM UnitVM) { if (ModelState.IsValid) { var check = UnitVM.ID > 0 ? service.Edit(UnitVM) : service.Save(UnitVM); return(Json(new { status = check }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { status = false }, JsonRequestBehavior.AllowGet)); } }