public void UpdateChecklistCoinGrade(int checklistCoinId, CbGrade grade) { var checklistCoin = _context.CbChecklistCoins.SingleOrDefault(x => x.Id == checklistCoinId); if (checklistCoin == null) { throw new Exception("CbChecklistCoin not found: " + checklistCoinId); } checklistCoin.Grade = grade; _context.SaveChanges(); }
public ActionResult UpdateChecklistCoinGrade(int checklistCoinId, CbGrade grade) { _checklistService.UpdateChecklistCoinGrade(checklistCoinId, grade); return(Json(new { result = "success" }, JsonRequestBehavior.AllowGet)); }