Ejemplo n.º 1
0
        public async Task <int> CreateCustomer(CustomerModel model)
        {
            if (model?.CustomerName == null)
            {
                throw new InvalidOperationException("Customer Name");
            }
            var customerEntity =
                new Customer {
                CustomerId = model.CustomerId, CustomerName = model.CustomerName
            };

            return(await _demoService.CreateCustomer(customerEntity));
        }