public AccountService(ThirdPartyContext context) { _context = context; }
public UserService(ThirdPartyContext context) { _context = context; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, BonbonniereContext bonbonniereContext, ThirdPartyContext thirdPartyContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } // Add the authentication middleware to the pipeline app.UseAuthentication(); app.UseCors("AllowSpecificOrigin"); //app.UseBasicAuthenticationMiddleware(); app.UseSwagger(); app.UseSwaggerUI(sg => { sg.SwaggerEndpoint($"/swagger/{_ApiVersion}/swagger.json", $"{_Project_Name} {_ApiVersion}"); sg.ShowRequestHeaders(); }); //app.UseStaticFiles(); //app.UseStatusCodePages(); app.UseMvc(); bonbonniereContext.Initialize(); thirdPartyContext.Initialize(); }