change some logic to the repositories

This commit is contained in:
Francesco D'Amico
2025-03-30 15:56:39 +02:00
parent c48d1bb5b2
commit 2acb4b4117
14 changed files with 715 additions and 0 deletions
@@ -0,0 +1,21 @@
namespace Francesco.Recipes.World.Repositories.Ingredient
{
using Francesco.Recipes.World.Models.BackendModels.Ingredient;
using Francesco.Recipes.World.Models.BackendModels.Recipe;
using Francesco.Recipes.World.Models.BackendModels.RecipeIngredient;
public interface IIngredientRepository
{
Task<Ingredient> CreateIngredientToRecipeAsync(Recipe recipe, string ingredientName);
Task UpdateIngredientAsync(Ingredient ingredient);
Task<List<RecipeIngredient>> GetIngredientsByRecipeIdAsync(Guid recipeId);
Task<List<Ingredient>> GetIngredientsByNameAsync(string name);
Task RemoveIngredientFromRecipeAsync(Recipe recipe, Guid ingredientId);
Task<Ingredient> GetIngredientByIdAsync(Guid ingredientId);
}
}