public async Task <IActionResult> Groceries() { var viewModel = (await GroceriesRepository.GetAllAsync()).Select(x => new GrocerieViewModel { Id = x.Id, StoreName = x.StoreName, BuyLocation = x.BuyLocation, Code = x.Code, Price = x.Price, Product = x.Product, Stock = x.Stock }); ViewData["Message"] = "All the storage is on this page (well it needs to be)."; return(View(viewModel)); }
public ItemExpiration(UserRepository userRepository, GroceriesRepository groceriesRepository) { _userRepository = userRepository; _groceriesRepository = groceriesRepository; }
public GroceriesLogic(GroceriesRepository groceriesRepository) { _groceriesRepository = groceriesRepository; }
public WasteLevelReminder(UserRepository userRepository, GroceriesRepository groceriesRepository) { _userRepository = userRepository; _groceriesRepository = groceriesRepository; }
public CharitiesLogic(CharitiesRepository charitiesRepository, GroceriesRepository groceriesRepository) { _charitiesRepository = charitiesRepository; _groceriesRepository = groceriesRepository; }