Esempio n. 1
0
 public HookrRepository(HookrContext context,
                        IPolicySet policySet,
                        ITelegramUserIdProvider telegramUserIdProvider,
                        ILoaderProvider loaderProvider)
 {
     PolicySet = policySet;
     this.telegramUserIdProvider = telegramUserIdProvider;
     this.loaderProvider         = loaderProvider;
     Context = context;
 }
Esempio n. 2
0
 public TelegramHookrRepository(HookrContext context,
                                IPolicySet policySet,
                                ITelegramUserIdProvider telegramUserIdProvider,
                                IMemoryCache memoryCache,
                                ILoaderProvider loaderProvider)
     : base(context,
            policySet,
            telegramUserIdProvider,
            loaderProvider)
 {
     this.memoryCache = memoryCache;
 }
Esempio n. 3
0
        // 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;
Esempio n. 5
0
 protected override DbSet <Hookah> EntityTableSelector(HookrContext context)
 => context.Hookahs;
Esempio n. 6
0
 protected abstract DbSet <TPhoto> PhotoTableSelector(HookrContext context);
Esempio n. 7
0
 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;