Exemplo n.º 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();
        }
Exemplo n.º 2
0
 public ReviewerScientificWorkRepository(KongresDbContext context)
 {
     _context = context;
 }
Exemplo n.º 3
0
 public ReviewRepository(KongresDbContext context)
 {
     _context = context;
 }
Exemplo n.º 4
0
 public ScientificWorkFileRepository(KongresDbContext context)
 {
     _context = context;
 }
Exemplo n.º 5
0
 public UserRepository(KongresDbContext context)
 {
     _context = context;
 }
Exemplo n.º 6
0
 public UserStore(KongresDbContext context)
 {
     _context = context;
 }
Exemplo n.º 7
0
 public RoleStore(KongresDbContext context)
 {
     _context = context;
 }