Releases: PawelGerr/Thinktecture.EntityFrameworkCore
Release list
10.4.0-beta02
Bug Fixes
- Bulk insert of
enumproperties — fixedInvalidCastException("Writing values of '…' is not supported for parameters having no NpgsqlDbType or DataTypeName") when bulk-inserting entities with a plain CLRenumproperty (including[Flags]enums) on PostgreSQL. The bulk-operation value reader now applies the type mapping's converter for enums, writing them as their underlying numeric value. Fix is in the Relational foundation and applies to all providers.
10.4.0-beta01
Features
- PostgreSQL:
bit_or/bit_and/bit_xoraggregates — addedEF.Functions.BitOr(),EF.Functions.BitAnd(), andEF.Functions.BitXor()for PostgreSQL, translating to the nativebit_or/bit_and/bit_xorGROUP BY aggregates. Usage:GroupBy(...).Select(g => EF.Functions.BitOr(g.Select(e => e.Col))). The generic overloads supportshort/int/long, their nullable forms, and[Flags]enums backed by an integer type. No cast is emitted — the aggregate reuses the group element's own type mapping and CLR return type, so enums and integers round-trip correctly. This is always-on (no feature flag). Note:bit_xorrequires PostgreSQL 14+.
Dependencies
- Updated EF Core (
Microsoft.EntityFrameworkCore.*) to10.0.9andNpgsql.EntityFrameworkCore.PostgreSQLto10.0.2, along withMicrosoft.Data.SqlClient6.1.6, test tooling (Microsoft.NET.Test.Sdk18.7.0,Testcontainers.*4.12.0,AwesomeAssertions9.4.0), andMicrosoft.SourceLink.GitHub10.0.300.
10.3.0
Features
-
PostgreSQL:
max/minaggregates overGuid(uuid) columns — PostgreSQL has no nativemax(uuid)/min(uuid)aggregate, so previously these queries translated but failed at execution withfunction max(uuid) does not exist. The Npgsql provider now auto-rewrites them tomax(col::text)::uuid/min(col::text)::uuid(text ordering of canonical uuid strings matches uuid byte ordering, so results are identical). This is always-on (no feature flag) and only triggers when the column's store type isuuid—Guid→textvalue-converter columns and the SQL Server / SQLite providers are left untouched. -
PostgreSQL:
max/minwindow functions overuuidcolumns —EF.Functions.Max()/EF.Functions.Min()used as window functions over auuidcolumn get the same treatment, emitting(max(col::text) OVER (...))::uuid. OnlyMAX/MINare rewritten (SUM/AVGover a uuid are meaningless and left untouched).
10.2.0
New features
- Window function
NTile— added theNTILEwindow function (EF.Functions.NTile(...)).
Per-provider behavior: SQL Server requires anORDER BYand returnsbigint; PostgreSQL and
SQLite returnintand theORDER BYis optional. - Static member translation in queries — static members (e.g. smart-enum values like
Status.Published, constants) are now translated in supported query and bulk-operation value
expressions.
Other
- Added an AI assistant skill to the repository to aid contributors.
10.1.0
New features
- PostgreSQL provider — new
Thinktecture.EntityFrameworkCore.PostgreSQLpackage (Npgsql),
bringing bulk operations, temp tables, window functions, collection parameters, and nested
transactions to PostgreSQL. - Bulk insert/update from query —
DbSet<T>.BulkInsertAsync(sourceQuery, …)and
DbSet<T>.BulkUpdateAsync(sourceQuery, …)on all providers. Inserts/updates rows directly from
anIQueryable<TSource>server-side (INSERT INTO … SELECT …/UPDATE … FROM (…)), with a
fluentMap/Setbuilder, optional filter, and table/schema overrides.
⚠️ Source-breaking API changes
These are consequences of the affected-row count now flowing through the bulk APIs:
IBulkInsertExecutor.BulkInsertAsync<T>now returnsTask<int>(number of inserted rows)
instead ofTask. Custom implementations must update their signature.TempTableQuery<T>'s 2-arg constructor was replaced by a 3-arg constructor
TempTableQuery(IQueryable<T> query, ITempTableReference reference, int numberOfInsertedRows),
backed by the newITempTableQuery<T>.NumberOfInsertedRows. Callers that construct
TempTableQuery<T>directly must pass the row count (e.g. the affected-row count of their own
insert command).
10.0.2
10.1.0-beta02
Fixes
- [PostgreSQL] Use
NpgsqlSqlNullabilityProcessorto fix null-handling in generated SQL.
10.1.0-beta01
New features
- PostgreSQL provider (experimental) — initial
Thinktecture.EntityFrameworkCore.PostgreSQL
package (Npgsql). - Bulk insert/update from query —
DbSet<T>.BulkInsertAsync(sourceQuery, …)and
DbSet<T>.BulkUpdateAsync(sourceQuery, …), inserting/updating rows directly from an
IQueryable<TSource>server-side.
⚠️ Source-breaking API changes
IBulkInsertExecutor.BulkInsertAsync<T>now returnsTask<int>(number of inserted rows)
instead ofTask.TempTableQuery<T>'s 2-arg constructor was replaced by a 3-arg constructor
TempTableQuery(IQueryable<T> query, ITempTableReference reference, int numberOfInsertedRows),
backed by the newITempTableQuery<T>.NumberOfInsertedRows.
10.0.1
10.0.0
Upgraded to EF Core 10 / .NET 10.
⚠️ Breaking changes
- Removed the
LeftJoinextension method — EF Core now supportsLeftJoinnatively. Use the
built-in method instead.
Other
- [SQL Server] Temp tables and scalar collection parameters with
decimalcolumns that have no
precision/scale configured now default todecimal(38,18).