P1_TrevorGraham/MvcStoreApplication/BusinessLogic/BusinessLogic.cs
/// <summary>
/// returns a list of viewmodels for all of the locations in the db
/// </summary>
/// <returns></returns>
returns a list of viewmodels for all of the locations in the db
returns a list of viewmodels for all of the locations in the db
public List<LocationViewModel> GetAllLocationViewModels()
        {
            List<Location> allLocations = _repository.GetAllLocations();
            List<LocationViewModel> locationViewModels = new List<LocationViewModel>();
            foreach (Location location in allLocations)
            {
                var locationViewModel = _mapper.ConvertLocationToLocationViewModel(location);
                locationViewModels.Add(locationViewModel);
            }
            return locationViewModels;
        }
public List < LocationViewModel > GetAllLocationViewModels ( ) { List < Location > allLocations = _repository . GetAllLocations ( ) ; List < LocationViewModel > locationViewModels = new List < LocationViewModel > ( ) ; foreach ( Location location in allLocations ) { var locationViewModel = _mapper . ConvertLocationToLocationViewModel ( location ) ; locationViewModels . Add ( locationViewModel ) ; } return locationViewModels ; }
returns a list of viewmodels for all of the locations in the db
returns a list of viewmodels for all of the locations in the db
None