public TruckModelRepositoryTests() { var context = new TruckManagerContext(dbContextOptions); DatabaseInit db = new DatabaseInit(); db.Seed(context); repo = new TruckModelRepository(context); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); DatabaseInit.Seed(app); } app.UseAuthMiddleware(); app.UseAuthentication(); app.UseCors("AllowAll"); app.UseMvc(); }