Пример #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            using (var serviceScope = app.ApplicationServices.GetService <IServiceScopeFactory>().CreateScope())
            {
                SantiContext dbContext = serviceScope.ServiceProvider.GetRequiredService <SantiContext>();
                dbContext.Database.Migrate();
            }

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

            app.UseHttpsRedirection();

            app.UseRouting();

            app.UseAuthorization();

            app.UseCors("AllowAll");

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });
        }
Пример #2
0
 public EstrategiaService(SantiContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Пример #3
0
 public ColinhaService(SantiContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Пример #4
0
 public CandidatoService(SantiContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Пример #5
0
 public SantinhoService(SantiContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Пример #6
0
 public PartidoService(SantiContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Пример #7
0
 public LoginService(SantiContext context)
 {
     _context = context;
 }