Beispiel #1
0
        public static List <Menue> GetMenues(RecipesContext db)
        {
            List <Menue> menues = new List <Menue>()
            {
                new Menue {
                    Name    = "TestName 1",
                    Recipes = new List <Recipe>(db.Recipes.Take(2))
                },
                new Menue {
                    Name    = "TestName 2",
                    Recipes = new List <Recipe>(db.Recipes.OrderBy(m => m.Name).Skip(1).Take(2))
                },
                new Menue {
                    Name    = "TestName 3",
                    Recipes = new List <Recipe>(db.Recipes.OrderBy(m => m.Name).Take(2))
                },
            };

            return(menues);
        }
Beispiel #2
0
        public static List <Recipe> GetRecipes(RecipesContext db)
        {
            List <Recipe> recipes = new List <Recipe>()
            {
                new Recipe {
                    Name        = "TestName 1",
                    Ingredients = new List <Ingredient>(db.Ingredients.Take(2))
                },
                new Recipe {
                    Name        = "TestName 2",
                    Ingredients = new List <Ingredient>(db.Ingredients.OrderBy(m => m.Name).Skip(1).Take(2))
                },
                new Recipe {
                    Name        = "TestName 3",
                    Ingredients = new List <Ingredient>(db.Ingredients.OrderBy(m => m.Fats).Take(2))
                },
            };

            return(recipes);
        }