private void PopulateList()
        {
            RecipeList.Add(new Recipe()
            {
                RecipeId   = 1,
                RecipeName = "Sweet Chilli Beef & Vegetable Stir-Fry",
                RecipeDesc = "with Garlic Rice",
                Picture    = "sweetchilli"
            });

            RecipeList.Add(new Recipe()
            {
                RecipeId   = 2,
                RecipeName = "Cheesy Pesto Chicken Calzones",
                RecipeDesc = "with Tomato Sauce & Marinated Zucchini",
                Picture    = "img1"
            });
            RecipeList.Add(new Recipe()
            {
                RecipeId   = 3,
                RecipeName = "Monterey Jack Cheeseburgers",
                RecipeDesc = "topped with Poblano & Tomato Salsa",
                Picture    = "img2"
            });
            RecipeList.Add(new Recipe()
            {
                RecipeId   = 4,
                RecipeName = "Roast Pork & Vegetables",
                RecipeDesc = "with Basil Pesto & Marinated Tomatoes",
                Picture    = "img3"
            });
            RecipeList.Add(new Recipe()
            {
                RecipeId   = 5,
                RecipeName = "Orange-Soy Barramundi & Fried Rice",
                RecipeDesc = "with Snow Peas & Bok Choy",
                Picture    = "img4"
            });
            RecipeList.Add(new Recipe()
            {
                RecipeId   = 6,
                RecipeName = "Sweet Potato & Spicy Cucumber Bao",
                RecipeDesc = "with Black Garlic Mayo",
                Picture    = "img5"
            });
            RecipeList.Add(new Recipe()
            {
                RecipeId   = 7,
                RecipeName = "Tahini Chicken",
                RecipeDesc = "with Tomato Sauce & Marinated Zucchini",
                Picture    = "img6"
            });
        }
Esempio n. 2
0
 private void RecipeListUpdatedEventHandler(object sender, EventArgs e)
 {
     RecipeList.Clear();
     if (_recipeListModel.Recipes.Count < 1)
     {
         _msgBoxService.ShowInfo("Vi er meget kede af det, men der er desværre ingen resultater. Prøv med en anden søgning.");
         return;
     }
     foreach (var recipe in _recipeListModel.Recipes)
     {
         RecipeList.Add(recipe);
     }
 }
Esempio n. 3
0
 public IActionResult Add(int id, [Bind("Id,Name,Time,Difficulty,NumberOfLikes,Ingredients,Process,Tips")] Recipe recipe)
 {
     RecipeList.Add(recipe);
     return(RedirectToAction(nameof(Index)));
 }