// 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(); } using (var context = new CoordinatesContext()) { context.Database.EnsureDeleted(); context.Database.EnsureCreated(); } app.UseDefaultFiles(); app.UseStaticFiles(); app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapHub <WhiteboardHub>("/draw"); }); }
public WhiteboardHub(CoordinatesContext _context) { this.dbcontext = _context; }