Example #1
0
        public IEnumerable <Food.Models.Food> GetFoods()
        {
            var foodRepo = new FoodRepo();
            var foods    = foodRepo.GetFoods();

            return(foods);
        }
Example #2
0
        public IEnumerable <FoodModel> GetSecondaryFoods()
        {
            var foodRepo = new FoodRepo();
            var foods    = foodRepo.GetFoods().Where(f => f.Type == 2)
                           .Select(f => new FoodModel()
            {
                Id = f.Id, Name = f.Name, Type = f.Type
            })
                           .OrderBy(f => f.Name);

            return(foods);
        }