Add Methodf to get all Shoopinglists on endpoint of the Detail Site of Shoppinglist
This commit is contained in:
@@ -60,10 +60,15 @@
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var recipeInAnyShoppingList = (await _shoppingListRepository.GetAllShoppingListsAsync())
|
||||
.SelectMany(sl => sl.RecipeShoppingList.Select(rsl => rsl.Recipe))
|
||||
.ToList();
|
||||
|
||||
var viewModel = new ShoppingListDetailsViewModel
|
||||
{
|
||||
ShoppingList = shoppingList,
|
||||
RecipeCount = recipeCount,
|
||||
RecipesInAnyShoppingList = recipeInAnyShoppingList,
|
||||
};
|
||||
|
||||
return View(viewModel);
|
||||
|
||||
Reference in New Issue
Block a user