Exemple #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();
            });
        }
Exemple #2
0
 public EstrategiaService(SantiContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Exemple #3
0
 public ColinhaService(SantiContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Exemple #4
0
 public CandidatoService(SantiContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
 public SantinhoService(SantiContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Exemple #6
0
 public PartidoService(SantiContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Exemple #7
0
 public LoginService(SantiContext context)
 {
     _context = context;
 }