示例#1
0
 // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
 public void Configure(IApplicationBuilder app, IHostingEnvironment env, IHeroTaskListDbContext dbContext,
                       IDbContextSeeder contextSeeder)
 {
     app.UseGraphiQl("/graphql");
     app.UseWebSockets();
     app.UseGraphQLWebSockets <HeroTaskListSchema>("/graphql");
     app.UseGraphQL <HeroTaskListSchema>();
     dbContext.Migrate();
     if (env.IsDevelopment())
     {
         app.UseDeveloperExceptionPage();
     }
     app.UseGraphQLPlayground(new GraphQLPlaygroundOptions());
     contextSeeder.Seed(dbContext);
 }
示例#2
0
 public SeedController(IDbContextSeeder dbContextSeeder)
 {
     this.dbContextSeeder = dbContextSeeder;
 }