public IActionResult AddRecipeToList(RecipeViewModel RecipeViewModel) { var listItem = _listItemService.AddRecipeToShopList(RecipeViewModel.RecipeId, RecipeViewModel.ShopListId); if (listItem == null) { return(RedirectToAction("Index")); } ViewBag.ErrorMessage = "Receptet finns redan i den valda inköpslistan"; PopulateShopList(); return(View(RecipeViewModel)); }