public UnitOfWork(RecipeBookContext context, ICategoryRepository categoryRepository, IIngredientRepository ingredientRepository, IRecipeRepository recipeRepository, IRecipeIngredientRepository recipeIngredientRepository, IRecipeStepRepository recipeStepRepository) { _context = context ?? throw new ArgumentNullException(nameof(context)); Categories = categoryRepository ?? throw new ArgumentNullException(nameof(categoryRepository)); Recipes = recipeRepository ?? throw new ArgumentNullException(nameof(recipeRepository)); Ingredients = ingredientRepository ?? throw new ArgumentNullException(nameof(ingredientRepository)); RecipeIngredients = recipeIngredientRepository ?? throw new ArgumentNullException(nameof(recipeIngredientRepository)); RecipeSteps = recipeStepRepository ?? throw new ArgumentNullException(nameof(recipeStepRepository)); }
public CategoryRepository(RecipeBookContext context) : base(context) { }
public IngredientRepository(RecipeBookContext context) : base(context) { }
public RecipeRepository(RecipeBookContext context) : base(context) { }
public BaseRepository(RecipeBookContext context) { _context = context ?? throw new ArgumentNullException(nameof(context)); }