// 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); } }
public GameRepository(DateBaseContent dateBaseContent) { this.dateBaseContent = dateBaseContent; }
public CategoryRepository(DateBaseContent dateBaseContent) { this.dateBaseContent = dateBaseContent; }