Esempio n. 1
0
        public async Task <CustomerModel> GetCustomerAsync(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                return(null);
            }

            var customer = await _context.Customers.SingleAsync(c => c.CustomerID == id);

            var model = CustomerConverter.ConvertToCustomerModel(customer);

            return(model);
        }