Пример #1
0
        public void ConfigureServices(IServiceCollection services)
        {
            GeneratedDependencies.ConfigureGeneratedServices(services);
            var options = new SQLiteStorageOptions();

            services.AddDbContext <EventStoreContext>(option => option.UseSqlite(Configuration.GetConnectionString("EventStoreDatabase")));
            services.AddDbContext <HangfireContext>(option => option.UseSqlite(Configuration.GetConnectionString("HangfireDatabase")));
            services.AddHangfire(configuration =>
                                 GlobalConfiguration.Configuration.UseSQLiteStorage(Configuration.GetConnectionString("HangfireDatabase"), options))
            .AddMvc();
        }
Пример #2
0
 public void Configure(IApplicationBuilder app)
 {
     GeneratedDependencies.ConfigureApplication(app);
     app.UseMvc();
 }