Пример #1
0
 /// <summary>
 /// Constructor
 /// Initialized the repositories needed for all functions needed for controller
 /// </summary>
 /// <param name="recipeRepository">creates recipe repository through dependency injection</param>
 /// <param name="foodRepository">>creates food repository through dependency injection</param>
 /// <param name="ingredientRepository">>creates ingredient repository through dependency injection</param>
 /// <param name="pantryRepository">>creates pantry repository through dependency injection</param>
 public RecipeController(IRecipeRepository recipeRepository, IFoodRepository foodRepository, IIngredientRepository ingredientRepository, IPantryRepository pantryRepository)
 {
     this.ingredientRepository = ingredientRepository;
     this.recipeRepository     = recipeRepository;
     this.foodRepository       = foodRepository;
     this.pantryRepository     = pantryRepository;
 }
 public MealIngredientsController(IPantryRepository repository, ILogger <MealIngredientsController> logger, IMapper mapper, LinkGenerator linkGenerator)
 {
     _repository    = repository;
     _logger        = logger;
     _mapper        = mapper;
     _linkGenerator = linkGenerator;
 }
Пример #3
0
 public MealFinderController(IPantryRepository repository, ILogger <MealFinderController> logger, IMapper mapper)
 {
     _repository = repository;
     _logger     = logger;
     _mapper     = mapper;
 }
Пример #4
0
 public PantryService(IPantryRepository pantryRepository)
 {
     _pantryRepository = pantryRepository;
 }
Пример #5
0
 public PantryService(IPantryRepository repository, UserInformation userInformation)
 {
     this.repository      = repository;
     this.userInformation = userInformation;
 }
Пример #6
0
 public PantryApiService(IPantryRepository pantryRepository,
                         IPantryStockRepository pantryStockRepository)
 {
     _pantryRepository      = pantryRepository;
     _pantryStockRepository = pantryStockRepository;
 }
Пример #7
0
 public FoodController(IFoodRepository foodRepository, IPantryRepository pantryRepository)
 {
     this.foodRepository   = foodRepository;
     this.pantryRepository = pantryRepository;
 }
Пример #8
0
 public IngredientController(IPantryRepository repository, ILogger <IngredientController> logger, IMapper mapper)
 {
     _repository = repository;
     _logger     = logger;
     _mapper     = mapper;
 }
Пример #9
0
 public PantryController(IPantryRepository pantryRepository, IRepository <Ingredient> ingredientRepo)
 {
     _pantryRepository = pantryRepository;
     _ingredientRepo   = ingredientRepo;
 }