// 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(); }); }
public EstrategiaService(SantiContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public ColinhaService(SantiContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public CandidatoService(SantiContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public SantinhoService(SantiContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public PartidoService(SantiContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public LoginService(SantiContext context) { _context = context; }