public IActionResult ModifyCrew(int id, [FromBody] Crew crew) { if (!ModelState.IsValid) { return(BadRequest() as IActionResult); } var entity = service.ReformCrew(crew); return(entity == null?StatusCode(304) as IActionResult : Ok(entity)); }
public IActionResult ModifyCrew([FromBody] long crewId, [FromBody] long pilotId, [FromBody] IEnumerable <long> stewardressesIds) { if (!ModelState.IsValid) { return(BadRequest() as IActionResult); } var entity = service.ReformCrew(crewId, pilotId, stewardressesIds); return(entity == null?StatusCode(304) as IActionResult : Ok(mapper.Map <CrewDTO>(entity))); }