Skip to content

Releases: PawelGerr/Thinktecture.EntityFrameworkCore

10.4.0-beta02

10.4.0-beta02 Pre-release
Pre-release

Choose a tag to compare

@PawelGerr PawelGerr released this 26 Jun 13:35
54fe164

Bug Fixes

  • Bulk insert of enum properties — fixed InvalidCastException ("Writing values of '…' is not supported for parameters having no NpgsqlDbType or DataTypeName") when bulk-inserting entities with a plain CLR enum property (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

10.4.0-beta01 Pre-release
Pre-release

Choose a tag to compare

@PawelGerr PawelGerr released this 25 Jun 20:06
e9cca05

Features

  • PostgreSQL: bit_or / bit_and / bit_xor aggregates — added EF.Functions.BitOr(), EF.Functions.BitAnd(), and EF.Functions.BitXor() for PostgreSQL, translating to the native bit_or / bit_and / bit_xor GROUP BY aggregates. Usage: GroupBy(...).Select(g => EF.Functions.BitOr(g.Select(e => e.Col))). The generic overloads support short/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_xor requires PostgreSQL 14+.

Dependencies

  • Updated EF Core (Microsoft.EntityFrameworkCore.*) to 10.0.9 and Npgsql.EntityFrameworkCore.PostgreSQL to 10.0.2, along with Microsoft.Data.SqlClient 6.1.6, test tooling (Microsoft.NET.Test.Sdk 18.7.0, Testcontainers.* 4.12.0, AwesomeAssertions 9.4.0), and Microsoft.SourceLink.GitHub 10.0.300.

10.3.0

Choose a tag to compare

@PawelGerr PawelGerr released this 25 Jun 07:22
926ff57

Features

  • PostgreSQL: max/min aggregates over Guid (uuid) columns — PostgreSQL has no native max(uuid)/min(uuid) aggregate, so previously these queries translated but failed at execution with function max(uuid) does not exist. The Npgsql provider now auto-rewrites them to max(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 is uuidGuidtext value-converter columns and the SQL Server / SQLite providers are left untouched.

  • PostgreSQL: max/min window functions over uuid columnsEF.Functions.Max() / EF.Functions.Min() used as window functions over a uuid column get the same treatment, emitting (max(col::text) OVER (...))::uuid. Only MAX/MIN are rewritten (SUM/AVG over a uuid are meaningless and left untouched).

10.2.0

Choose a tag to compare

@PawelGerr PawelGerr released this 18 Jun 06:26
f57a0ba

New features

  • Window function NTile — added the NTILE window function (EF.Functions.NTile(...)).
    Per-provider behavior: SQL Server requires an ORDER BY and returns bigint; PostgreSQL and
    SQLite return int and the ORDER BY is 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

Choose a tag to compare

@PawelGerr PawelGerr released this 18 Jun 06:25
58c014d

New features

  • PostgreSQL provider — new Thinktecture.EntityFrameworkCore.PostgreSQL package (Npgsql),
    bringing bulk operations, temp tables, window functions, collection parameters, and nested
    transactions to PostgreSQL.
  • Bulk insert/update from queryDbSet<T>.BulkInsertAsync(sourceQuery, …) and
    DbSet<T>.BulkUpdateAsync(sourceQuery, …) on all providers. Inserts/updates rows directly from
    an IQueryable<TSource> server-side (INSERT INTO … SELECT … / UPDATE … FROM (…)), with a
    fluent Map/Set builder, 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 returns Task<int> (number of inserted rows)
    instead of Task. 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 new ITempTableQuery<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

Choose a tag to compare

@PawelGerr PawelGerr released this 22 Feb 10:51
270799a
  • [SQL Server] Delimit/escape column names when generating the CREATE PRIMARY KEY statement,
    fixing primary keys on columns whose names require quoting (#73).

10.1.0-beta02

10.1.0-beta02 Pre-release
Pre-release

Choose a tag to compare

@PawelGerr PawelGerr released this 20 Feb 10:09
630d9a4

Fixes

  • [PostgreSQL] Use NpgsqlSqlNullabilityProcessor to fix null-handling in generated SQL.

10.1.0-beta01

10.1.0-beta01 Pre-release
Pre-release

Choose a tag to compare

@PawelGerr PawelGerr released this 20 Feb 10:06
30ecf3b

New features

  • PostgreSQL provider (experimental) — initial Thinktecture.EntityFrameworkCore.PostgreSQL
    package (Npgsql).
  • Bulk insert/update from queryDbSet<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 returns Task<int> (number of inserted rows)
    instead of Task.
  • TempTableQuery<T>'s 2-arg constructor was replaced by a 3-arg constructor
    TempTableQuery(IQueryable<T> query, ITempTableReference reference, int numberOfInsertedRows),
    backed by the new ITempTableQuery<T>.NumberOfInsertedRows.

10.0.1

Choose a tag to compare

@PawelGerr PawelGerr released this 20 Feb 10:05
4dadfeb
  • Introduced the new Thinktecture.EntityFrameworkCore.Sqlite.Core package, splitting the SQLite
    foundation from the full SQLite package.

10.0.0

Choose a tag to compare

@PawelGerr PawelGerr released this 11 Nov 21:21
c6c8904

Upgraded to EF Core 10 / .NET 10.

⚠️ Breaking changes

  • Removed the LeftJoin extension method — EF Core now supports LeftJoin natively. Use the
    built-in method instead.

Other

  • [SQL Server] Temp tables and scalar collection parameters with decimal columns that have no
    precision/scale configured now default to decimal(38,18).