Skip to content

Commit 92bcd1f

Browse files
authored
VCST-4591: Suppress No instantiatable types implementing IEntityTypeConfiguration warning (#2978)
1 parent 0dc1c3d commit 92bcd1f

File tree

6 files changed

+15
-9
lines changed

6 files changed

+15
-9
lines changed

src/VirtoCommerce.Platform.Data.MySql/Extensions/DbContextOptionsBuilderExtensions.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Microsoft.EntityFrameworkCore;
2+
using Microsoft.EntityFrameworkCore.Diagnostics;
23
using Microsoft.EntityFrameworkCore.Infrastructure;
34
using Microsoft.Extensions.Configuration;
45

@@ -22,6 +23,7 @@ public static DbContextOptionsBuilder UseMySqlDatabase(
2223
{
2324
mySqlDbContextOptionsBuilder.MigrationsAssembly(migrationsAssemblyMarkerType.Assembly.GetName().Name);
2425
mySqlOptionsAction?.Invoke(mySqlDbContextOptionsBuilder, configuration);
25-
});
26+
})
27+
.ConfigureWarnings(warnings => warnings.Ignore(CoreEventId.NoEntityTypeConfigurationsWarning));
2628
}
2729
}

src/VirtoCommerce.Platform.Data.MySql/Readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
## Install CLI tools for Entity Framework Core
44
```cmd
5-
dotnet tool install --global dotnet-ef --version 10.0.0
5+
dotnet tool install --global dotnet-ef --version 10.0.1
66
```
77

88
or update
99

1010
```cmd
11-
dotnet tool update --global dotnet-ef --version 10.0.0
11+
dotnet tool update --global dotnet-ef --version 10.0.1
1212
```
1313

1414
## Add Migration

src/VirtoCommerce.Platform.Data.PostgreSql/Extensions/DbContextOptionsBuilderExtensions.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Microsoft.EntityFrameworkCore;
2+
using Microsoft.EntityFrameworkCore.Diagnostics;
23
using Microsoft.Extensions.Configuration;
34
using Npgsql.EntityFrameworkCore.PostgreSQL.Infrastructure;
45

@@ -21,6 +22,7 @@ public static DbContextOptionsBuilder UsePostgreSqlDatabase(
2122
{
2223
npgsqlDbContextOptionsBuilder.MigrationsAssembly(migrationsAssemblyMarkerType.Assembly.GetName().Name);
2324
npgsqlOptionsAction?.Invoke(npgsqlDbContextOptionsBuilder, configuration);
24-
});
25+
})
26+
.ConfigureWarnings(warnings => warnings.Ignore(CoreEventId.NoEntityTypeConfigurationsWarning));
2527
}
2628
}

src/VirtoCommerce.Platform.Data.PostgreSql/Readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
## Install CLI tools for Entity Framework Core
44
```cmd
5-
dotnet tool install --global dotnet-ef --version 10.0.0
5+
dotnet tool install --global dotnet-ef --version 10.0.1
66
```
77

88
or update
99

1010
```cmd
11-
dotnet tool update --global dotnet-ef --version 10.0.0
11+
dotnet tool update --global dotnet-ef --version 10.0.1
1212
```
1313

1414
## Add Migration

src/VirtoCommerce.Platform.Data.SqlServer/Extensions/DbContextOptionsBuilderExtensions.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Microsoft.EntityFrameworkCore;
2+
using Microsoft.EntityFrameworkCore.Diagnostics;
23
using Microsoft.EntityFrameworkCore.Infrastructure;
34
using Microsoft.Extensions.Configuration;
45

@@ -33,6 +34,7 @@ public static DbContextOptionsBuilder UseSqlServerDatabase(
3334

3435
sqlServerOptionsBuilder.MigrationsAssembly(migrationsAssemblyMarkerType.Assembly.GetName().Name);
3536
sqlServerOptionsAction?.Invoke(sqlServerOptionsBuilder, configuration);
36-
});
37+
})
38+
.ConfigureWarnings(warnings => warnings.Ignore(CoreEventId.NoEntityTypeConfigurationsWarning));
3739
}
3840
}

src/VirtoCommerce.Platform.Data.SqlServer/Readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
## Install CLI tools for Entity Framework Core
44
```cmd
5-
dotnet tool install --global dotnet-ef --version 10.0.0
5+
dotnet tool install --global dotnet-ef --version 10.0.1
66
```
77

88
or update
99

1010
```cmd
11-
dotnet tool update --global dotnet-ef --version 10.0.0
11+
dotnet tool update --global dotnet-ef --version 10.0.1
1212
```
1313

1414
## Add Migration

0 commit comments

Comments
 (0)