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))); }
public IActionResult AddCustomer(Customers customer) { return(Ok(_storage.AddCustomer(customer))); }