public async Task <int> Add(CustomerClientDTO _customer)
        {
            Customer customer = new Customer()
            {
                Name      = _customer.Name,
                Phone     = (decimal)_customer.Phone,
                EmailId   = _customer.EmailId,
                Address   = _customer.Address,
                AccountId = 6
            };
            var new_customer = customerRepository.AutoAdd(customer);

            Save();
            return(new_customer.Id);
        }
Beispiel #2
0
        public async Task <IHttpActionResult> PostCustomer(CustomerClientDTO customer)
        {
            var result = await _service.Add(customer);

            return(Ok(result));
        }