public ActionResult PutDataType(int id, DataTypeModel dataType) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != dataType.Id) { return(BadRequest()); } try { datatypeRepo.UpdateDataType(dataType); } catch (DbUpdateConcurrencyException ex) { logger.Error(ex); throw; } return(NoContent()); }