public IActionResult Update(int id, [FromBody] Bill model) { if (id > 0 && model != null) { _dbContext.Update(model); _dbContext.SaveChanges(); TempData["success"] = $"Purchase Invoice No:{model.No} updated successfully"; return(Json(model.Id)); } return(BadRequest(ModelState)); }
public void Update <T>(T entity) { Context.Update(entity); }