// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, SVTADbContext sVTADbContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseHttpsRedirection(); app.UseRouting(); //garante que o banco sera criado //sVTADbContext.Database.EnsureCreated(); app.UseAuthentication(); app.UseStaticFiles(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
public ImagesController(SVTADbContext sVTADbContext) { _svtaDbContext = sVTADbContext; }
public CategoriasController(SVTADbContext sVTADbContext) { _sVTADbContext = sVTADbContext; }
public ContasController(IConfiguration configuration, SVTADbContext dbContext) { _svtaDbContext = dbContext; _configuration = configuration; _auth = new AuthService(_configuration); }
public VeiculosController(SVTADbContext sVTADbContext) { _sVTADbContext = sVTADbContext; }