예제 #1
0
        public ActionResult Insert([FromBody] CustomerDTO customerDTO)
        {
            if (!ModelState.IsValid)
            {
                return(NotFound());
            }

            applicationServiceCustomer.Insert(customerDTO);

            return(Ok("Customer successfully registered!"));
        }
 public ActionResult <CustomerDTO> Post([FromBody] CustomerDTO customerDTO)
 {
     try
     {
         return(_customerApplicationService.Insert(customerDTO));
     }
     catch (Exception ex)
     {
         return(BadRequest(new { ex.Message }));
     }
 }