public async Task <ActionResult> UpdateProjectMilestone([FromBody] Production model) { if (ModelState.IsValid) { try { await _repository.UpdateProduction(model); return(Ok()); } catch (Exception ex) { if (ex.GetType().FullName == "Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException") { return(NotFound()); } return(BadRequest()); } } return(BadRequest()); }