public CategoryController()
 {
     _categoryRepository       = new CategoryRepository();
     _filterRepository         = new FilterRepository();
     _recommendationRepository = new RecommendationRepository();
     _globalRepository         = new DBFirstDAL.Repositories.GlobalOptionRepository();
     _routeItemRepository      = new RouteItemRepository();
 }
        // Initalize Method used for all tests
        public RecommendationTests(DatabaseFixture fixture)
        {
            this.fixture = fixture;

            _bookRepository           = new BookRepository(fixture.dbContext);
            _personRepository         = new PersonRepository(fixture.dbContext);
            _recommendationRepository = new RecommendationRepository(fixture.dbContext);
        }
Exemplo n.º 3
0
 public ProductController()
 {
     _productRepository        = new ProductRepository();
     _enumRepositopy           = new EnumValueRepository();
     _categoryRepository       = new CategoryRepository();
     _recommendationRepository = new RecommendationRepository();
     _globalOptionRepository   = new GlobalOptionRepository();
     _filterRepository         = new FilterRepository();
     _routeItemRepository      = new RouteItemRepository();
 }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            Console.WriteLine("Class Program Start..");
            //    UserSeeder userSeeder = new UserSeeder();
            //TagSeeder tagSeeder = new TagSeeder();
            //       ProblemSeeder problemSeeder = new ProblemSeeder();
            RecommendationRepository rec = new RecommendationRepository();
            var list = rec.GetUserProblemSug(new Guid("d71ec257-97da-40e0-b400-092651c2bbac"));

            Console.ReadLine();
        }
        private void CheckRecommendationsEndAndSendNotification()
        {
            using (var databaseFactory = new DatabaseFactory(IoC.Resolve <IConnectionString>()))
            {
                using (IUnitOfWork unitOfWork = new LinqToSql.Repository.UnitOfWork(databaseFactory))
                {
                    var recommendationRepository = new RecommendationRepository(databaseFactory);
                    var recommendations          = recommendationRepository.FindRecommendationToSendNotification(_intervalToCheckEndingRecommendationInDays);

                    foreach (IRecommendation recommendation in recommendations)
                    {
                        _emailSender.NotifyRecommendationEnds(recommendation);
                        recommendation.NotificationIsSent = true;
                    }
                    unitOfWork.Commit();
                }
            }
        }
 public RecommendationController(RecommendationRepository recommendationRepository, IMapper mapper)
 {
     _recommendationRepository = recommendationRepository;
     _mapper = mapper;
 }
 public RecommendationController()
 {
     _recommendationRepository = new RecommendationRepository();
     _eventBannerRepository    = new EventBannerRepository();
     _routeItemRepository      = new RouteItemRepository();
 }