Example #1
0
 public IActionResult AddCustomer(Customer customer)
 {
     if (customer.first_name == "" || customer.last_name == "")
     {
         string message = "You need to fill out both first and last name fields, before submitting the form.";
         return(BadRequest(message));
     }
     return(Ok(_storage.AddCustomer(customer)));
 }
Example #2
0
 public IActionResult AddCustomer(Customers customer)
 {
     return(Ok(_storage.AddCustomer(customer)));
 }