Change some method logic

This commit is contained in:
franc
2025-04-29 09:04:18 +02:00
parent e6a9e92748
commit 3ca5b35cfe
2 changed files with 2 additions and 3 deletions
@@ -18,7 +18,7 @@
Task<Recipe?> GetRecipeByNameAndImageAsync(string recipeName, string imageFileName);
Task<int> GetShoppingListRecipeCountAsync(Guid shoppingListId);
Task<int> GetShoppingListRecipeCountAsync();
}
}
@@ -168,10 +168,9 @@
.FirstOrDefaultAsync();
}
public async Task<int> GetShoppingListRecipeCountAsync(Guid shoppingListId)
public async Task<int> GetShoppingListRecipeCountAsync()
{
return await _context.RecipeShoppingLists
.Where(rsl => rsl.ShoppingList.Id == shoppingListId)
.CountAsync();
}
}