Ejemplo n.º 1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseStaticFiles();
            app.UseRouting();
            app.UseCors();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllerRoute("default", "{controller=Games}/{action=List}");
            });
            using (var scope = app.ApplicationServices.CreateScope())
            {
                DateBaseContent content = app.ApplicationServices.GetRequiredService <Data.DateBaseContent>();
                DataBaseObject.Initial(content);
            }
        }
Ejemplo n.º 2
0
 public GameRepository(DateBaseContent dateBaseContent)
 {
     this.dateBaseContent = dateBaseContent;
 }
Ejemplo n.º 3
0
 public CategoryRepository(DateBaseContent dateBaseContent)
 {
     this.dateBaseContent = dateBaseContent;
 }