public FoodsController(IFoodRepository foodRepository, IMapper mapper, IUnitOfWork <ICommunityDbContext> unitOfWork, IDomainNotificationHandler domainNotificationHandler, IMediator mediator, ILogger <FoodsController> logger) : base(domainNotificationHandler, mediator, logger) { _foodRepository = foodRepository; _mapper = mapper; _unitOfWork = unitOfWork; }
public FoodController(IFoodRepository foodRepository, IUserRepository userRepository, IWaterRepository waterRepository) { this.foodRepository = foodRepository; this.userRepository = userRepository; this.waterRepository = waterRepository; }
public LogDayViewModel(IFoodRepository foodRepository) { FoodRepository = foodRepository; Title = ""; Items = new ObservableCollection <FoodDayGroup>(); Date = DateTime.MinValue; BreakFast = new FoodDayGroup("Ontbijt", MealType.BreakFast); Items.Add(BreakFast); Lunch = new FoodDayGroup("Lunch", MealType.Lunch); Items.Add(Lunch); Diner = new FoodDayGroup("Diner", MealType.Diner); Items.Add(Diner); Snack = new FoodDayGroup("Snack", MealType.Snack); Items.Add(Snack); InitDayCommand = new Command(async() => await ExecuteDayCommand()); LoadItemsCommand = new Command(async() => await ExecuteLoadItemsCommand()); MessagingCenter.Subscribe <LogAddToDayPage, FoodPerDay>(this, "AddItem", async(obj, item) => { var newItem = item as FoodPerDay; await FoodRepository.SaveFoodForDay(newItem); }); }
public OrderController(IOrderRepository orderRepository, IMenuItemRepository menuItemRepository, IFoodRepository foodRepository, IConfiguration configuration) { this._orderRepository = orderRepository; this._menuItemRepository = menuItemRepository; this._foodRepository = foodRepository; this._configuration = configuration; }
public FoodController(IFoodFactory foodFactory, IMealFactory mealFactory, IFoodRepository repository, IMealRepository mealRepository) { this.repository = repository; this.mealRepository = mealRepository; this.foodFactory = foodFactory; this.mealFactory = mealFactory; }
/// <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 FoodsController(IFoodRepository foodRepository, IFoodListRepository foodListRepository, IRandomNumberGenerator randomNumberGenerator) { _foodRepository = foodRepository; _foodListRepository = foodListRepository; _randomNumberGenerator = randomNumberGenerator; }
public LogAddViewModel(IFoodRepository foodRepository, FoodPerDay entry) { FoodRepository = foodRepository; Item = entry; SelectableFoods = new ObservableCollection <Food>(); MealTypes = new ObservableCollection <MealTypeItem>(); MealTypes.Add(new MealTypeItem() { MealType = MealType.BreakFast, Name = "Ontbijt" }); MealTypes.Add(new MealTypeItem() { MealType = MealType.Lunch, Name = "Lunch" }); MealTypes.Add(new MealTypeItem() { MealType = MealType.Diner, Name = "Diner" }); MealTypes.Add(new MealTypeItem() { MealType = MealType.Snack, Name = "Tussendoor" }); SelectedMealType = MealTypes.First(f => f.MealType == entry.MealType); }
public ActiveStudent(ISettings settings, IStudentRepository studentRepository, IFoodRepository foodRepository, Lazy <IReserveLogRepository> reserveLogRepository) { _reserveLogRepository = reserveLogRepository; _foodRepository = foodRepository; _settings = settings; _studentRepository = studentRepository; }
public CheckoutController(IOrderRepository orderRepository, IUserOrderRepository userOrderRepository, IOrderDetailRepository orderDetailRepository, IFoodRepository foodRepository) { _orderRepository = orderRepository; _userOrderRepository = userOrderRepository; _orderDetailRepository = orderDetailRepository; _foodRepository = foodRepository; }
public UnitOfWork(FoodContext context, IFoodRepository foodRepository, IFoodCategoryRepository foodCategoryRepository,IPresetMealRepository presetMealRepository) { Context = context; FoodRepository = foodRepository; FoodCategoryRepository = foodCategoryRepository; PresetMealRepository = presetMealRepository; }
public FoodService() { if (Repository == null) { Repository = new FoodRepository(); } }
public MealController(IFoodRepository foodRepository, IIngestionRepository ingestionRepository, IOneDayFoodRepository oneDayFoodRepository, IWeightOfFoodRepository weightOfFoodRepository) { _foodRepository = foodRepository; _ingestionRepository = ingestionRepository; _oneDayFoodRepository = oneDayFoodRepository; _weightOfFoodRepository = weightOfFoodRepository; }
public MainWindow() { InitializeComponent(); builder = new ContainerBuilder(); builder.RegisterModule(new DataModule("ExamDiaryDB_AndrianovaConnectionString")); builder.RegisterType <EFContext>().As <IEFContext>(); builder.RegisterType <FoodRepository>().As <IFoodRepository>(); builder.RegisterType <MyPlateRepository>().As <IMyPlateRepository>(); builder.RegisterType <PlateFoodRecordRepository>().As <IPlateFoodRecordRepository>(); Container = builder.Build(); foodRep = Container.Resolve <IFoodRepository>(); myplateRep = Container.Resolve <IMyPlateRepository>(); platefoodrecordRepositoryRep = Container.Resolve <IPlateFoodRecordRepository>(); if (checkNet() == true) { ProductComboBox.ItemsSource = GetData(); List <Food> list = GetData(); foreach (var p in list) { foodlist.Add(p); } MealTimePicker.SelectedDate = DateTime.Now; } else { MessageBox.Show("Невозможно открыть программу! Отсутствует подключение к сети Интернет!"); System.Windows.Application.Current.Shutdown(); } }
public IngredientsController(IProductRepository repository, IFoodRepository foodRepository, IHubContext <FoodHub> hubContext) { _repository = repository; _foodRepository = foodRepository; _hubContext = hubContext; }
public CartService(IFoodRepository foodRepository, IUserRepository userRepository, DtoModelMapper dtoModelMapper) { _userRepository = userRepository; _foodRepository = foodRepository; _dtoModelMapper = dtoModelMapper; }
public FoodController(IFoodRepository food, ILogger <FoodController> logger, IMapper mapper, IUrlHelper urlHelper) { _food = food; _mapper = mapper; _logger = logger; _urlHelper = urlHelper; }
public CartService() { _userRepository = new UserRepository(DataStore.Instance.State.Users); _foodRepository = new FoodRepository(DataStore.Instance.State.Foods); _dtoModelMapper = new DtoModelMapper(); }
public DetalesAndRecommendationsWindow(SqlDateTime t) { InitializeComponent(); _t = t; builder = new ContainerBuilder(); builder.RegisterModule(new DataModule("ExamDiaryDB_AndrianovaConnectionString")); builder.RegisterType <EFContext>().As <IEFContext>(); builder.RegisterType <FoodRepository>().As <IFoodRepository>(); builder.RegisterType <MyPlateRepository>().As <IMyPlateRepository>(); builder.RegisterType <PlateFoodRecordRepository>().As <IPlateFoodRecordRepository>(); Container = builder.Build(); foodRep = Container.Resolve <IFoodRepository>(); myplateRep = Container.Resolve <IMyPlateRepository>(); platefoodrecordRepositoryRep = Container.Resolve <IPlateFoodRecordRepository>(); YourHeightTextBox.Text = user._Height.ToString(); YourWeightTextBox.Text = user._Weight.ToString(); YourAgeTextBox.Text = user._Age.ToString(); YourCcal.Text = user._Ccal.ToString(); if (user._Gender == true) { radioButtonFemale.IsChecked = true; } else { radioButtonMale.IsChecked = true; } }
/// <summary> /// Counstructor /// </summary> /// <param name="fastFoodDbContext">FastFoodDbContext - Injection</param> /// <param name="foodRepository">FoodRepository - Injection</param> /// <param name="paymentRepository">PaymentRepository - Injection</param> /// <param name="userRepository">UserRepository - Injection</param> /// <param name="paymentMethodRepository">PaymentMethodRepository - Injection</param> /// <param name="sentEmailRepository">SentEmailRepository - Injection</param> /// <param name="sentMessageRepository">SentMessageRepository - Injection</param> /// <param name="authorizationRepository">AuthorizationRepository - Injection</param> public UnitOfWork ( FastFoodDbContext fastFoodDbContext, IFoodRepository foodRepository, IPaymentRepository paymentRepository, IUserRepository userRepository, IPaymentMethodRepository paymentMethodRepository, ISentEmailRepository sentEmailRepository, ISentMessageRepository sentMessageRepository, IAuthorizationRepository authorizationRepository ) { _fastFoodDbContext = fastFoodDbContext; FoodRepository = foodRepository; PaymentRepository = paymentRepository; UserRepository = userRepository; PaymentMethodRepository = paymentMethodRepository; SentEmailRepository = sentEmailRepository; SentMessageRepository = sentMessageRepository; AuthorizationRepository = authorizationRepository; // Setup the DbContext FoodRepository.DbContext = _fastFoodDbContext; PaymentRepository.DbContext = _fastFoodDbContext; UserRepository.DbContext = _fastFoodDbContext; PaymentMethodRepository.DbContext = _fastFoodDbContext; SentEmailRepository.DbContext = _fastFoodDbContext; SentMessageRepository.DbContext = _fastFoodDbContext; AuthorizationRepository.DbContext = _fastFoodDbContext; }
public MealService(IFoodRepository foodRepository, IMealRepository mealRepository, IUserRepository userRepository, IUnitOfWork unitOfWork) { this.unitOfWork = unitOfWork; this.foodRepository = foodRepository; this.mealRepository = mealRepository; this.userRepository = userRepository; }
public StatsViewModel(IOrderService orderService, IFoodRepository foodRepository) { var orders = orderService.GetPastOrders().Result; _orderedFood = orders.Select(order => foodRepository.GetFoodInfo(order.FoodId)).ToList(); CalculateSpendStats(); CalculateHealthStats(); }
public RestaurantsController(IFoodTypeRepository foodType, IFoodCategoryRepository foodCategory, IRestaurantRepository restaurant, IRestaurantFoodRepository restaurantFood, IFoodRepository food) { _foodType = foodType; _foodCategory = foodCategory; _restaurant = restaurant; _restaurantFood = restaurantFood; _food = food; }
public FoodsController(IUrlHelper urlHelper, IFoodRepository foodRepository, IHubContext <FoodHub> hubContext, IHttpContextAccessor accessor) { _foodRepository = foodRepository; _hubContext = hubContext; _urlHelper = urlHelper; _accessor = accessor; }
public MealCommandHandler(IMealRepository mealRepository, IFoodRepository foodRepository, IMapper mapper, IIdentityService identityService, IMediator mediator, IUnitOfWork <ICommunityDbContext> unitOfWork, ILogger <MealCommandHandler> logger) : base(identityService, mediator, unitOfWork, logger) { _mealRepository = mealRepository; _foodRepository = foodRepository; _mapper = mapper; _currentProfileId = GetCurrentProfileId(); }
public FoodService(IFoodRepository foodRepository, ILogger <FoodService> logger, IMapper mapper) { _foodRepository = foodRepository; _logger = logger; _mapper = mapper; }
public FoodsController( IUrlHelper urlHelper, IFoodRepository foodRepository, IMapper mapper) { _foodRepository = foodRepository; _mapper = mapper; _urlHelper = urlHelper; }
public FoodService(IFoodRepository foodRepository, IMessageHandler feedbackHandler, IMessageSerializer messageSerializer, IQueryHelper queryHelper) { _foodRepository = foodRepository; this.FeedbackHandler = feedbackHandler; _messageSerializer = messageSerializer; _queryHelper = queryHelper; }
public SesshinService(ISesshinRepository sesshinRepository, IFoodRepository foodRepository, IDayOfSesshinRepository dayOfSesshinRepository, IUnitOfWork unitOfWork) : base(sesshinRepository, unitOfWork) { _foodRepository = foodRepository; _dayOfSesshinRepository = dayOfSesshinRepository; }
public FoodItemsController( IFoodRepository foodRepository, IHubContext <ChatHub> hubContext, IMapper mapper) { _foodRepository = foodRepository; _chatHubContext = hubContext; _mapper = mapper; }
public DietService( IFoodRepository foodRepository, IPlanRepository planRepository, IProfileRepository profileRepository) { this.foodRepository = foodRepository; this.planRepository = planRepository; this.profileRepository = profileRepository; }
public FoodManager(IFoodRepository foodRepository, IRestaurantRepository restaurantRepository, IUserRepository userRepository, IHttpContextAccessor httpContext) { this.foodRepository = foodRepository; this.restaurantRepository = restaurantRepository; this.userRepository = userRepository; this.httpContext = httpContext; }
public Food RetrieveCompleteFood(int id, IFoodRepository repository) { //retrieve from cache Food food = FoodClient.RetrieveCompleteFood(id); if (food == null) { //retrieve from database food = repository.RetrieveCompleteFood(id); //save to cache FoodClient.SaveCompleteFood(food, id); } return food; }
public IList<Food> RetrieveFoods(IFoodRepository repository) { //retrieve from cache IList<Food> foods = FoodClient.RetrieveFoods(); if (foods == null) { //retrieve from database foods = repository.RetrieveFoods(); //save to cache FoodClient.SaveFoods(foods); } return foods; }
public CartController(IFoodRepository repository) { _repository = repository; }
public NavigationController(IFoodRepository repository) { this._repository = repository; }
public FoodItemsController(IFoodRepository foodRepository, IConnectionManager connectionManager, ITimerService timerService) { _foodRepository = foodRepository; _coolMessageHubContext = connectionManager.GetHubContext<CoolMessagesHub>(); timerService.TimerElapsed += _timerService_TimerElapsed; }
public FoodLogic(IUnitOfWork unit, IFoodRepository repo, ITeamLogic teamLogic) { this.Unit = unit; this.Repo = repo; this.TeamLogic = teamLogic; }