Make TODO: Only run this if using a real database (#569)
use IsSqlServer extension method on catalogContext.Database (DatabaseFacade)
This commit is contained in:
1 parent
52e2f0b06f
commit
729354297f
1 file changed
+5
-2
@@ -15,8 +15,11 @@ namespace Microsoft.eShopWeb.Infrastructure.Data
|
||||
int retryForAvailability = retry.Value;
|
||||
try
|
||||
{
|
||||
// TODO: Only run this if using a real database
|
||||
// catalogContext.Database.Migrate();
|
||||
if (catalogContext.Database.IsSqlServer())
|
||||
{
|
||||
catalogContext.Database.Migrate();
|
||||
}
|
||||
|
||||
if (!await catalogContext.CatalogBrands.AnyAsync())
|
||||
{
|
||||
await catalogContext.CatalogBrands.AddRangeAsync(
|
||||
|
||||
Reference in new issue
Block a user