public ActionResult Update([FromBody] AddressDTO addressDTO) { if (!ModelState.IsValid) { return(NotFound()); } applicationServiceAddress.Update(addressDTO); return(Ok("Address changed successfully!")); }
public ActionResult <AddressDTO> Put(int id, [FromBody] AddressDTO addressDTO) { try { return(_addressApplicationService.Update(id, addressDTO)); } catch (Exception ex) { return(BadRequest(new { ex.Message })); } }