public ServissRepository( IOptions <AppSettings> settings, AutoServissDbContext context, IMemoryCache memoryCache) { _settings = settings.Value; _context = context; _memoryCache = memoryCache; }
public KlientiRepository( IOptions <AppSettings> settings, IMemoryCache memoryCache, AutoServissDbContext context) { _settings = settings.Value; _memoryCache = memoryCache; _context = context; }
public StatussRepository(AutoServissDbContext context, IMemoryCache memoryCache) { _context = context; _memoryCache = memoryCache; }
public AuthService(IOptions <AppSettings> settings, AutoServissDbContext context) { _settings = settings.Value; _context = context; }
public void Configure(IApplicationBuilder app, IOptions <AppSettings> settings, AutoServissDbContext dbContext) { app.UseMiddleware(typeof(CustomExceptionHandlerMiddleware)); if (_env.IsDevelopment()) { app.UseCors(policy => { policy.AllowAnyOrigin(); policy.AllowCredentials(); policy.AllowAnyHeader(); policy.AllowAnyMethod(); }); } app.UseDefaultFiles(); app.UseStaticFiles(); //// nginx reverse-proxy, jābūt pirms UseAuthentication //app.UseForwardedHeaders(new ForwardedHeadersOptions //{ // ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto //}); app.UseAuthentication(); app.UseMvc(); //SeedData.Initialize(dbContext, _env); }