public string CreateNewElem([FromBody] AircraftsDTO element) { if (!ModelState.IsValid) { return("Not valid data"); } try { crewService.Create(element); return("Created the new element"); } catch (Exception e) { return(e.Message); } }
public string UpdateElem(int id, [FromBody] AircraftsDTO element) { if (!ModelState.IsValid) { return("Not valid data"); } try { crewService.Update(id, element); return("Updated new elemnt"); } catch (Exception e) { return(e.Message); } }