Пример #1
0
        public IActionResult RemoveRecipe(int id)
        {
            RecipePlan recipePlan = recipePlanService.Get(id);

            recipePlan.Plan   = planService.Get(recipePlan.PlanId);
            recipePlan.Recipe = recipeService.Get(recipePlan.RecipeId);

            return(View(recipePlan));
        }
Пример #2
0
        public IActionResult AddRecipe(RecipePlan recipePlan)
        {
            if (ModelState.IsValid)
            {
                recipePlanService.Create(recipePlan);
            }

            return(RedirectToAction("AddRecipe"));
        }