コード例 #1
0
        public TruckModelRepositoryTests()
        {
            var          context = new TruckManagerContext(dbContextOptions);
            DatabaseInit db      = new DatabaseInit();

            db.Seed(context);

            repo = new TruckModelRepository(context);
        }
コード例 #2
0
        // 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();
        }