// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, PapersDbContext dbContext) { dbContext.Database.EnsureDeleted(); dbContext.Database.Migrate(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthorization(); // configuration for Angular client app.UseCors("CorsPolicy"); app.UseSpaStaticFiles(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapHub <PlaygroundHub>("/playground"); }); app.UseSpa(spa => { spa.Options.SourcePath = Path.Join(env.ContentRootPath, "PapersClient"); if (env.IsDevelopment()) { spa.Options.StartupTimeout = new TimeSpan(0, 1, 90); spa.UseAngularCliServer(npmScript: "start"); } }); }
public PapersController(PapersDbContext db) { this.db = db; }
public GameSessionDataService(PapersDbContext db) { this.db = db; }
public PlayersDataService(PapersDbContext db) { this.db = db; }