public RecipeService( IDbSet <Recipe> set, IIngredientTypesService ingredientTypesService, IRecipeIngredientsService ingredientsService, IRecipeImagesService recipeImagesService, IRecipeStepsService recipeStepsService, IDbContext context) : base(set, context) { if (ingredientTypesService == null) { throw new ArgumentNullException(); } if (ingredientsService == null) { throw new ArgumentNullException(nameof(ingredientsService)); } if (recipeImagesService == null) { throw new ArgumentNullException(nameof(recipeImagesService)); } if (recipeStepsService == null) { throw new ArgumentNullException(nameof(recipeStepsService)); } this.ingredientTypesService = ingredientTypesService; this.ingredientsService = ingredientsService; this.recipeImagesService = recipeImagesService; this.recipeStepsService = recipeStepsService; }
public void Initialize() { var dataGenerator = new TestDataGenerator(); this.context = dataGenerator.GenerateContext(); this.set = this.context.RecipeSteps; this.service = new RecipeStepsService(this.set, this.context); }
public RecipeStepsController(IRecipeStepsService recipeStepsService, IMapper mapper) { _recipeStepsService = recipeStepsService; _mapper = mapper; }