public int AddCustomer(Customer customer)
        {
            if (customer == null)
            {
                throw new ArgumentNullException("customer");
            }

            return(_customerData.AddCustomer(customer));
        }
예제 #2
0
        public IActionResult Register([FromBody] Customer customerobject)
        {
            var list = customers.GetList();

            if (customerobject == null)
            {
                return(BadRequest());
            }
            customers.AddCustomer(customerobject);
            return(Ok());
        }