示例#1
0
 public static IApplicationBuilder UseFakeRepository(this IApplicationBuilder app)
 {
     using (var serviceScope = app.ApplicationServices.CreateScope())
     {
         var context = serviceScope.ServiceProvider.GetService <PostDbContext>();
         FakeRepository.AdicionarDadosTeste(context);
     }
     return(app);
 }