// 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 client = new RaspberryPi3WebControlDbContext()) { client.Database.EnsureCreated(); } app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
public Ws2812bManager(IWs2812bAdapter ws2812BAdapter, RaspberryPi3WebControlDbContext dbContext) { _dbContext = dbContext; _ws2812BAdapter = ws2812BAdapter; //InitSchema(); }