public IActionResult CreateCopter([FromBody] CopterAggregate copterDto) { var copter = new Copter().CreateFromDto(copterDto); var id = _copterRepository.Create(copter); return(Ok($"Copter with ID: {copter.Id} were successfully created")); }
public IActionResult UpdateCopter(int id, [FromBody] CopterAggregate copterDto) { var copter = new Copter().CreateFromDto(copterDto); _copterRepository.Update(id, copter); return(Ok($"Copter {copter.Brand} {copter.Name} with ID: {copter.Id} were successfully updated")); }