public async Task <CustomerModel[]> CustomersAsync()
        {
            // TODO: Add authorization checks
            var customersQuery = _customerRepository.AllCustomers();

            var models = await customersQuery.MapToCustomerModels();

            return(models);
        }
        // GET: Customers
        public ActionResult AllCustomers()
        {
            var repo = new CustomerRepository();

            return(View(repo.AllCustomers()));
        }
Exemplo n.º 3
0
 public AllCustomersViewModel()
 {
     _customerRepository = new CustomerRepository();
     AllCustomers        = new ObservableCollection <ICustomerView>(_customerRepository.AllCustomers());
 }