public ActionResult Insert([FromBody] AddressDTO addressDTO) { if (!ModelState.IsValid) { return(NotFound()); } applicationServiceAddress.Insert(addressDTO); return(Ok("Address successfully registered!")); }
public ActionResult <AddressDTO> Post([FromBody] AddressDTO addressDTO) { try { return(_addressApplicationService.Insert(addressDTO)); } catch (Exception ex) { return(BadRequest(new { ex.Message })); } }