public int AddCustomer(Customer customer) { if (customer == null) { throw new ArgumentNullException("customer"); } return(_customerData.AddCustomer(customer)); }
public IActionResult Register([FromBody] Customer customerobject) { var list = customers.GetList(); if (customerobject == null) { return(BadRequest()); } customers.AddCustomer(customerobject); return(Ok()); }