Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var builder = new ConfigurationBuilder();

            builder.SetBasePath(Directory.GetCurrentDirectory());
            builder.AddJsonFile("appsettings.json");
            IConfigurationRoot config           = builder.Build();
            string             connectionString = config.GetConnectionString("DefaultConnection");
            var optionsBuilder = new DbContextOptionsBuilder <AniraSpDbContext>();
            DbContextOptions <AniraSpDbContext> options = optionsBuilder.UseSqlServer(connectionString)
                                                          .Options;
            var aniraSpDbContext   = new AniraSpDbContext(options);
            var offerStorageWorker = new OfferStorageWorker(new PortionUploader(aniraSpDbContext));
            var offerGenerator     = new OfferGenerator();
            var service            = new Service(offerStorageWorker, offerGenerator);

            service.Run();
            Console.WriteLine("Hello World!");
            Console.ReadKey();
        }
Exemplo n.º 2
0
 public OffersRepository(AniraSpDbContext aniraSpDbContext)
 {
     _aniraSpDbContext = aniraSpDbContext;
 }
Exemplo n.º 3
0
 public BulkCopyUploader(AniraSpDbContext aniraSpDbContext)
 {
     _aniraSpDbContext = aniraSpDbContext;
 }
Exemplo n.º 4
0
 public PortionUploader(AniraSpDbContext aniraSpDbContext)
 {
     _aniraSpDbContext = aniraSpDbContext;
     OfferPortions     = 100000;
 }
Exemplo n.º 5
0
 public SitesRepository(AniraSpDbContext aniraSpDbContext)
 {
     _aniraSpDbContext = aniraSpDbContext;
 }