Exemple #1
0
        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;
 }
Exemple #5
0
 public CharitiesLogic(CharitiesRepository charitiesRepository, GroceriesRepository groceriesRepository)
 {
     _charitiesRepository = charitiesRepository;
     _groceriesRepository = groceriesRepository;
 }