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
                    
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="Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL" />
                    
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 Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL --version 2.0.0
                    
#r "nuget: Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL, 2.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 Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL@2.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=Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Athenex.Whimclean.Infrastructure.EntityFrameworkCore.PostgreSQL&version=2.0.0
                    
Install as a Cake Tool

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.

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.