public ActionResult Update([FromBody] AddressDTO addressDTO)
        {
            if (!ModelState.IsValid)
            {
                return(NotFound());
            }

            applicationServiceAddress.Update(addressDTO);

            return(Ok("Address changed successfully!"));
        }
Beispiel #2
0
 public ActionResult <AddressDTO> Put(int id, [FromBody] AddressDTO addressDTO)
 {
     try
     {
         return(_addressApplicationService.Update(id, addressDTO));
     }
     catch (Exception ex)
     {
         return(BadRequest(new { ex.Message }));
     }
 }