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

            applicationServiceAddress.Insert(addressDTO);

            return(Ok("Address successfully registered!"));
        }
Exemple #2
0
 public ActionResult <AddressDTO> Post([FromBody] AddressDTO addressDTO)
 {
     try
     {
         return(_addressApplicationService.Insert(addressDTO));
     }
     catch (Exception ex)
     {
         return(BadRequest(new { ex.Message }));
     }
 }