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();
|
return NotFound();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var recipeInAnyShoppingList = (await _shoppingListRepository.GetAllShoppingListsAsync())
|
||||||
|
.SelectMany(sl => sl.RecipeShoppingList.Select(rsl => rsl.Recipe))
|
||||||
|
.ToList();
|
||||||
|
|
||||||
var viewModel = new ShoppingListDetailsViewModel
|
var viewModel = new ShoppingListDetailsViewModel
|
||||||
{
|
{
|
||||||
ShoppingList = shoppingList,
|
ShoppingList = shoppingList,
|
||||||
RecipeCount = recipeCount,
|
RecipeCount = recipeCount,
|
||||||
|
RecipesInAnyShoppingList = recipeInAnyShoppingList,
|
||||||
};
|
};
|
||||||
|
|
||||||
return View(viewModel);
|
return View(viewModel);
|
||||||
|
|||||||
Reference in New Issue
Block a user