Change some method logic
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user