Beispiel #1
0
        public async void Configure(IApplicationBuilder app, IWebHostEnvironment env, KongresDbContext context,
                                    RoleManager <Role> roleManager, IJobsInitializer jobsInitializer)
        {
            context.Database.Migrate();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseHttpsRedirection();
            app.UseStaticFiles();
            app.UseSpaStaticFiles();

            app.UseRouting();

            app.UseAuthentication();

            IdentityDataInitializer.SeedData(roleManager);

            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });

            app.UseSpa(spa =>
            {
                spa.Options.SourcePath = ReactPath;

                if (env.IsDevelopment())
                {
                    spa.UseReactDevelopmentServer(npmScript: "start");
                }
            });

            await jobsInitializer.SeedJobsAsync();
        }
Beispiel #2
0
 public ReviewerScientificWorkRepository(KongresDbContext context)
 {
     _context = context;
 }
Beispiel #3
0
 public ReviewRepository(KongresDbContext context)
 {
     _context = context;
 }
Beispiel #4
0
 public ScientificWorkFileRepository(KongresDbContext context)
 {
     _context = context;
 }
Beispiel #5
0
 public UserRepository(KongresDbContext context)
 {
     _context = context;
 }
Beispiel #6
0
 public UserStore(KongresDbContext context)
 {
     _context = context;
 }
Beispiel #7
0
 public RoleStore(KongresDbContext context)
 {
     _context = context;
 }