Skip to content

Commit f4ecd4e

Browse files
committed
feat: switch database configuration from Npgsql to SqlServer in EfCoreContextDesignTimeFactory
1 parent fac1d5f commit f4ecd4e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Source/Ecommerce.Infrastructure/Persistence/EfCore/EfCoreContextDesignTimeFactory.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ public EfCoreContext CreateDbContext(string[] args)
1515
{
1616
var optionsBuilder = new DbContextOptionsBuilder<EfCoreContext>();
1717

18-
optionsBuilder.UseNpgsql(
19-
"Host=localhost;Database=ecommerce;Username=postgres;Password=123;Port=5432;"
20-
);
21-
// optionsBuilder.UseSqlServer(
22-
// "Server=EVOO-EG-LP7\\SQLEXPRESS;Database=ecommerce;Trusted_Connection=True;TrustServerCertificate=True;"
18+
// optionsBuilder.UseNpgsql(
19+
// "Host=localhost;Database=ecommerce;Username=postgres;Password=123;Port=5432;"
2320
// );
21+
optionsBuilder.UseSqlServer(
22+
"Server=EVOO-EG-LP7\\SQLEXPRESS;Database=ecommerce;Trusted_Connection=True;TrustServerCertificate=True;"
23+
);
2424

2525
return new EfCoreContext(optionsBuilder.Options);
2626
}

0 commit comments

Comments
 (0)