10 references to MyDb1Context
DatabaseMigration.ApiModel (3)
Migrations\20240216140519_InitialCreate.Designer.cs (1)
13[DbContext(typeof(MyDb1Context))]
Migrations\MyDb1ContextModelSnapshot.cs (1)
12[DbContext(typeof(MyDb1Context))]
MyDb1Context.cs (1)
6public class MyDb1Context(DbContextOptions<MyDb1Context> options) : DbContext(options)
DatabaseMigration.ApiService (2)
Program.cs (2)
10builder.AddSqlServerDbContext<MyDb1Context>("db1", configureDbContextOptions: options => 20app.MapGet("/", async (MyDb1Context context) =>
DatabaseMigration.MigrationService (5)
ApiDbInitializer.cs (4)
27var dbContext = scope.ServiceProvider.GetRequiredService<MyDb1Context>(); 41private static async Task EnsureDatabaseAsync(MyDb1Context dbContext, CancellationToken cancellationToken) 57private static async Task RunMigrationAsync(MyDb1Context dbContext, CancellationToken cancellationToken)
Program.cs (1)
15builder.AddSqlServerDbContext<MyDb1Context>("db1");