Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL
2.0.0
Prefix Reserved
dotnet add package Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL --version 2.0.0
NuGet\Install-Package Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL -Version 2.0.0
<PackageReference Include="Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL" Version="2.0.0" />
<PackageVersion Include="Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL" Version="2.0.0" />
<PackageReference Include="Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL" />
paket add Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL --version 2.0.0
#r "nuget: Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL, 2.0.0"
#:package Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL@2.0.0
#addin nuget:?package=Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL&version=2.0.0
#tool nuget:?package=Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL&version=2.0.0
Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL
The PostgreSQL/Npgsql provider adapter for Whimclean EF Core infrastructure.
Install
dotnet add package Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL
The package supplies Npgsql.EntityFrameworkCore.PostgreSQL and depends on the provider-neutral EF Core package.
Register a business context
Use AddPostgreSqlUnitOfWork when the context implements IUnitOfWork, such as a context derived from AuditableDbContext or MultiTenantDbContext:
using Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL;
services.AddPostgreSqlUnitOfWork<ApplicationDbContext>(
connectionString,
postgreSql => postgreSql.MigrationsAssembly(
"MyApp.Migrations.PostgreSQL"));
This calls UseNpgsql with the connection string and registers both ApplicationDbContext and IUnitOfWork with scoped lifetimes. The second argument is an optional Action<NpgsqlDbContextOptionsBuilder>. A null or whitespace connection string throws ArgumentException.
Register an ordinary EF context
Use AddPostgreSqlContext for a framework-owned context that must not become the application unit of work, such as a separate reporting or integration context:
services.AddPostgreSqlContext<ReportingDbContext>(
reportingConnectionString,
postgreSql => postgreSql.MigrationsAssembly(
"MyApp.Reporting.Migrations.PostgreSQL"));
Only the DbContext is registered; nothing else.
Context separation
Multiple contexts may share one PostgreSQL database, but keep their migration histories and migration commands explicitly identifiable by context. Whimclean never runs migrations on its own; the EF Core package applies them only when the application is started with the --migrate switch handled by DatabaseMigration.
Multitenancy is provider-neutral. A tenant-aware context still uses AddPostgreSqlUnitOfWork; install the separate EF multitenancy package to derive that context from MultiTenantDbContext.
This package contains no tenant model, membership management, or API behavior.
Case-insensitive search
SearchILike narrows a query to rows where any of the given string members contains the search term, using EF.Functions.ILike with %, _ and \ escaped through LikePattern; a null term leaves the query unchanged. The pattern is sent as a query parameter, and an empty field list throws ArgumentException:
using Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL.Queries;
query = query.SearchILike(options.SearchTerm, user => user.Email, user => user.DisplayName);
Repository and full architecture guide: https://github.com/athene-x/Whimclean
| 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
- Athenex.Whimclean.Infrastructure.EntityFrameworkCore (>= 2.0.0)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 10.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL:
| Package | Downloads |
|---|---|
|
Athenex.Whimflow.Infrastructure.EntityFrameworkCore.PostgreSQL
Whimflow persistence on EF Core and PostgreSQL: the model an application adds to its own DbContext, the history writer, repositories and the due-step query. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0 | 117 | 11/17/2026 |
2.0.0: first nuget.org release. Npgsql configuration and DbContext registration, plus SearchILike for case-insensitive multi-field search over ILIKE with escaped wildcards.