// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IdentityDbContext context, FCParkDbContext fcparkcontext, UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager) { if (env.IsDevelopment()) { //app.UseDeveloperExceptionPage(); app.UseExceptionHandler("/api/exception"); } else { //app.UseExceptionHandler("/api/error"); app.UseHsts(); } // Criação de estruturas, usuários e permissões // na base do ASP.NET Identity Core (caso ainda não // existam) new IdentityInitializer(context, userManager, roleManager) .Initialize(); new DBInitialize(fcparkcontext) .Initialize(); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); app.UseSwagger(); // Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.), // specifying the Swagger JSON endpoint. app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "API FCAMARA"); c.RoutePrefix = "swagger"; }); }
public MovimentacaoVeiculoRepository(FCParkDbContext context) : base(context) { }