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)); }
public IActionResult AddRecipe(RecipePlan recipePlan) { if (ModelState.IsValid) { recipePlanService.Create(recipePlan); } return(RedirectToAction("AddRecipe")); }