コード例 #1
0
 public IActionResult AddCustomer(Customer newCustomer)
 {
     try
     {
         _customerService.AddCustomerToRepo(newCustomer);
         return(CreatedAtAction("AddCustomer", newCustomer));
     }
     catch (Exception)
     {
         // TODO: Check if this is the right error code for this.
         return(StatusCode(500));
     }
 }