Merge branch 'feature/ShoppingList-Logic' into 'develop'
ShoppingList Logic See merge request francesco.damico/francescos.recipes.world!8
This commit is contained in:
@@ -49,8 +49,6 @@
|
||||
<Folder Include="Services\Category\" />
|
||||
<Folder Include="Services\MediaFile\" />
|
||||
<Folder Include="Services\Ingredient\" />
|
||||
<Folder Include="Services\Instruction\" />
|
||||
<Folder Include="Services\ShoppingList\" />
|
||||
<Folder Include="Services\Recipe\" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -17,5 +17,7 @@
|
||||
Task DeleteShoppingListAsync(Guid shoppingListId);
|
||||
|
||||
Task<Recipe?> GetRecipeByNameAndImageAsync(string recipeName, string imageFileName);
|
||||
|
||||
Task<int> CountAllRecipeShoppinglistsAsync();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,5 +167,11 @@
|
||||
.Include(r => r.MediaFiles.Where(mf => mf.FileName == imageFileName))
|
||||
.FirstOrDefaultAsync();
|
||||
}
|
||||
|
||||
public async Task<int> CountAllRecipeShoppinglistsAsync()
|
||||
{
|
||||
return await _context.RecipeShoppingLists
|
||||
.CountAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user