P1_TrevorGraham/MvcStoreApplication/BusinessLogic/BusinessLogic.cs
/// <summary>
/// Returns a list of viewmodels for every customer in the db
/// </summary>
/// <returns></returns>
Returns a list of viewmodels for every customer in the db
Returns a list of viewmodels for every customer in the db
public List<CustomerViewModel> GetAllCustomerViewModels()
        {
            List<Customer> allCustomers = _repository.GetAllCustomers();
            List<CustomerViewModel> allCustomerViewModels = new List<CustomerViewModel>();
            foreach (Customer cust in allCustomers)
            {
                var customerViewModel = _mapper.ConvertCustomerToCustomerViewModel(cust);
                allCustomerViewModels.Add(customerViewModel);
            }
            return allCustomerViewModels;
        }
public List < CustomerViewModel > GetAllCustomerViewModels ( ) { List < Customer > allCustomers = _repository . GetAllCustomers ( ) ; List < CustomerViewModel > allCustomerViewModels = new List < CustomerViewModel > ( ) ; foreach ( Customer cust in allCustomers ) { var customerViewModel = _mapper . ConvertCustomerToCustomerViewModel ( cust ) ; allCustomerViewModels . Add ( customerViewModel ) ; } return allCustomerViewModels ; }
Returns a list of viewmodels for every customer in the db
Returns a list of viewmodels for every customer in the db
None