EntityFrameworkCore.ExplicitConfiguration
1.0.0-preview.2
dotnet add package EntityFrameworkCore.ExplicitConfiguration --version 1.0.0-preview.2
NuGet\Install-Package EntityFrameworkCore.ExplicitConfiguration -Version 1.0.0-preview.2
<PackageReference Include="EntityFrameworkCore.ExplicitConfiguration" Version="1.0.0-preview.2" />
<PackageVersion Include="EntityFrameworkCore.ExplicitConfiguration" Version="1.0.0-preview.2" />
<PackageReference Include="EntityFrameworkCore.ExplicitConfiguration" />
paket add EntityFrameworkCore.ExplicitConfiguration --version 1.0.0-preview.2
#r "nuget: EntityFrameworkCore.ExplicitConfiguration, 1.0.0-preview.2"
#:package EntityFrameworkCore.ExplicitConfiguration@1.0.0-preview.2
#addin nuget:?package=EntityFrameworkCore.ExplicitConfiguration&version=1.0.0-preview.2&prerelease
#tool nuget:?package=EntityFrameworkCore.ExplicitConfiguration&version=1.0.0-preview.2&prerelease
EntityFrameworkCore.ExplicitConfiguration
True explicit EF Core configuration behaviour. Nothing is discovered unless you configure it.
Problem
EF Core discovers a lot by convention.
That is convenient until the model contains things you never meant to map:
- entities discovered through navigation properties
- properties added just because they exist on the CLR type
- keys inferred from naming conventions
- foreign keys, indexes, cascade rules, and value generation configured implicitly
This package switches that default. Only what you configure explicitly ends up in the model.
Installation
dotnet add package EntityFrameworkCore.ExplicitConfiguration
Usage
services.AddDbContext<MyContext>(options =>
options
.UseSqlServer(connectionString) // or any other provider
.UseExplicitConfiguration());
You can re-enable selected convention groups when needed:
services.AddDbContext<MyContext>(options =>
options
.UseSqlServer(connectionString) // or any other provider
.UseExplicitConfiguration(options =>
{
options.EnablePropertyDiscovery = true;
options.EnableKeyDiscovery = true;
}));
Behavior
By default, the package disables:
- entity discovery
- property discovery
- key discovery
- foreign key discovery
- cascade delete convention
- foreign key index convention
- value generation convention
That gives you a model where unmapped CLR members are absent unless you configure them explicitly.
License
The library is licensed under the MIT license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-preview.2 | 57 | 4/11/2026 |
| 1.0.0-preview.1 | 58 | 4/11/2026 |