P1_TrevorGraham/MvcStoreApplication/BusinessLogic/BusinessLogic.cs
/// <summary>
/// Returns a list of viewmodels based on all of the products in the db
/// </summary>
/// <returns></returns>
Returns a list of viewmodels based on all of the products in the db
Returns a list of viewmodels based on all of the products in the db
public List<ProductViewModel> GetAllProductViewModels()
        {
            var allProducts = _repository.GetAllProducts();
            List<ProductViewModel> viewModels = new List<ProductViewModel>();
            foreach (Product item in allProducts)
            {
                viewModels.Add(_mapper.ConvertProductToProductViewModel(item));
            }
            return viewModels;
        }
public List < ProductViewModel > GetAllProductViewModels ( ) { var allProducts = _repository . GetAllProducts ( ) ; List < ProductViewModel > viewModels = new List < ProductViewModel > ( ) ; foreach ( Product item in allProducts ) { viewModels . Add ( _mapper . ConvertProductToProductViewModel ( item ) ) ; } return viewModels ; }
Returns a list of viewmodels based on all of the products in the db
Returns a list of viewmodels based on all of the products in the db
None