Skip to content

Commit 0f791af

Browse files
author
Tiago Brenck
committed
Comments to run it inmemory
1 parent 2a8b724 commit 0f791af

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

1-WebApp-OIDC/1-2-AnyOrg/Startup.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public void ConfigureServices(IServiceCollection services)
4545

4646
services.AddOptions();
4747

48+
//If you want to run this sample using in memory db, uncomment the line below (options.UseInMemoryDatabase) and comment the one that uses options.UseSqlServer.
4849
//services.AddDbContext<SampleDbContext>(options => options.UseInMemoryDatabase(databaseName: "MultiTenantOnboarding"));
4950
services.AddDbContext<SampleDbContext>(options => options.UseSqlServer(Configuration.GetConnectionString("SampleDbConnStr")));
5051

@@ -101,6 +102,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
101102
using (var serviceScope = app.ApplicationServices.GetService<IServiceScopeFactory>().CreateScope())
102103
{
103104
var context = serviceScope.ServiceProvider.GetRequiredService<SampleDbContext>();
105+
// Uncomment, run the solution, and comment again to reset the DB
104106
//context.Database.EnsureDeleted();
105107
context.Database.EnsureCreated();
106108
}

0 commit comments

Comments
 (0)