public async Task <IActionResult> Put(int id, [FromBody] CrewDTO modelDTO) { if (modelDTO == null) { ModelState.AddModelError("", "Ticket structure is wrong!!!"); return(BadRequest(ModelState)); } if (!ModelState.IsValid) { return(BadRequest(ModelState)); } await service.Update(id, modelDTO); return(Ok(modelDTO)); }
public CrewDto Put(int id, [FromBody] CrewDto entity) { return(_crewsSrvice.Update(entity)); }