public HookrRepository(HookrContext context, IPolicySet policySet, ITelegramUserIdProvider telegramUserIdProvider, ILoaderProvider loaderProvider) { PolicySet = policySet; this.telegramUserIdProvider = telegramUserIdProvider; this.loaderProvider = loaderProvider; Context = context; }
public TelegramHookrRepository(HookrContext context, IPolicySet policySet, ITelegramUserIdProvider telegramUserIdProvider, IMemoryCache memoryCache, ILoaderProvider loaderProvider) : base(context, policySet, telegramUserIdProvider, loaderProvider) { this.memoryCache = memoryCache; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, HookrContext context) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapFallback(x => { x.Response.Redirect("/"); return(Task.CompletedTask); }); endpoints .MapGet("/", context => context.Response.WriteAsync("Nope, that's not a web application")); }); }
protected override DbSet <Tobacco> EntityTableSelector(HookrContext context) => context.Tobaccos;
protected override DbSet <Hookah> EntityTableSelector(HookrContext context) => context.Hookahs;
protected abstract DbSet <TPhoto> PhotoTableSelector(HookrContext context);
protected override DbSet <HookahPhoto> PhotoTableSelector(HookrContext context) => context.HookahPhotos;
protected abstract DbSet <TProduct> EntityTableSelector(HookrContext context);
protected override DbSet <TobaccoPhoto> PhotoTableSelector(HookrContext context) => context.TobaccoPhotos;