DotOrgProjects.EntityPlatform.Finder 1.0.0

dotnet add package DotOrgProjects.EntityPlatform.Finder --version 1.0.0
                    
NuGet\Install-Package DotOrgProjects.EntityPlatform.Finder -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DotOrgProjects.EntityPlatform.Finder" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DotOrgProjects.EntityPlatform.Finder" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="DotOrgProjects.EntityPlatform.Finder" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DotOrgProjects.EntityPlatform.Finder --version 1.0.0
                    
#r "nuget: DotOrgProjects.EntityPlatform.Finder, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DotOrgProjects.EntityPlatform.Finder@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DotOrgProjects.EntityPlatform.Finder&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=DotOrgProjects.EntityPlatform.Finder&version=1.0.0
                    
Install as a Cake Tool

EP Finder — Entity Platform Finder

EP Finder is a module of the Entity Platform (EP) team of .ORG Projects, designed to eliminate the need to manually declare DbContext and its DbSet<T> properties in applications that use Entity Framework Core.

EP Finder scans an assembly and root namespace looking for classes annotated with the [Table] data attribute and registers them automatically in EF Core by replacing its internal IDbSetFinder service.

Note: EP Finder only works with entities configured via Data Attributes. Fluent API is not supported and there are no plans to support it.


Installation

dotnet add package DotOrgProjects.EntityPlatform.Finder

Usage

using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using DotOrgProjects.EntityPlatform.Finder;

namespace MyApp {
    class Program {
        static void Main(string[] args) {
            ServiceCollection services = new ServiceCollection();

            services.AddDbContext<DbFoundContext>(options => {
                options.UseSqlServer("Server=localhost;Database=MyDb;");
                options.UseFinderIn("MyApp.Assembly", "MyApp.Entities.Root.Namespace");
            });

            ServiceProvider provider = services.BuildServiceProvider();

            DbContext context = provider.GetRequiredService<DbFoundContext>();

            List<Product> products = context.Set<Product>().ToList();
        }
    }
}

The developer always works with Microsoft.EntityFrameworkCore.DbContext — the internal classes of EP Finder are never referenced directly.


How It Works

DbSetFinder replaces EF Core's internal IDbSetFinder via ReplaceService<IDbSetFinder, DbSetFinder>(). Instead of looking for DbSet<T> properties declared in the DbContext, it scans the assembly and root namespace configured in DbFinderContextOptionsExtension looking for classes annotated with [Table] and registers them as model entities.

EF Core guarantees that OnConfiguring always runs regardless of how the DbFoundContext instance is created, so DbSetFinder is always correctly registered.

Warning: IDbSetFinder is an internal EF Core API subject to changes between versions without prior notice. It has not changed between EF Core 8, 9, and 10.


Migrations

EF Core discovers DbFoundContext at design time through DI — when running the app startup it finds DbFoundContext registered with AddDbContext<DbFoundContext>() and uses it to generate migrations. No additional design time class is required.


License

EP Finder is licensed under the Microsoft Public License (Ms-PL).

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 0 5/15/2026