diff --git a/entity-framework/core/learn-more/community-standups.md b/entity-framework/core/learn-more/community-standups.md index d53d04be43..eac4c81958 100644 --- a/entity-framework/core/learn-more/community-standups.md +++ b/entity-framework/core/learn-more/community-standups.md @@ -420,7 +420,7 @@ Featuring: Links: - Product: [Hot Chocolate for GraphQL](https://chillicream.com/docs/hotchocolate) -- Docs: [Hot Chocolate and Entity Framework Core](https://chillicream.com/docs/hotchocolate/integrations/entity-framework) +- Docs: [Hot Chocolate and Entity Framework Core](https://chillicream.com/docs/hotchocolate/v14/integrations/entity-framework) diff --git a/entity-framework/core/providers/sqlite/functions.md b/entity-framework/core/providers/sqlite/functions.md index bcc0c1e3a4..6725219b68 100644 --- a/entity-framework/core/providers/sqlite/functions.md +++ b/entity-framework/core/providers/sqlite/functions.md @@ -22,7 +22,9 @@ group.Min(x => x.Property) | MIN(Property) group.Sum(x => x.Property) | SUM(Property) group.Sum(x => x.DecimalProperty) | ef_sum(DecimalProperty) | EF Core 9.0 string.Concat(group.Select(x => x.Property)) | group_concat(Property, '') +string.Concat(group.OrderBy(x => x.Other).Select(x => x.Property)) | group_concat(Property, '' ORDER BY Other) | EF Core 11.0 string.Join(separator, group.Select(x => x.Property)) | group_concat(Property, @separator) +string.Join(separator, group.OrderBy(x => x.Other).Select(x => x.Property)) | group_concat(Property, @separator ORDER BY Other) | EF Core 11.0 ## Binary functions diff --git a/entity-framework/core/what-is-new/ef-core-11.0/breaking-changes.md b/entity-framework/core/what-is-new/ef-core-11.0/breaking-changes.md index d2b096990e..653592f09d 100644 --- a/entity-framework/core/what-is-new/ef-core-11.0/breaking-changes.md +++ b/entity-framework/core/what-is-new/ef-core-11.0/breaking-changes.md @@ -122,7 +122,7 @@ If your application uses composite keys whose values can contain the characters - **Existing data**: Documents previously stored in Cosmos DB have `id` values using the old escape sequences (e.g. `Post|1|^2F`). After upgrading to EF Core 11, EF will generate unescaped `id` values (e.g. `Post|1|/`) and will no longer find those existing documents. To continue accessing existing data without migration, opt back into the old behavior using the `AppContext` switch described above—however, be aware that the id-collision bug will still be present. -- **New data**: If you are creating a new application or database, avoid using these illegal characters in key values, as they are not valid in Cosmos DB resource `id` values. See the [Azure documentation](https://learn.microsoft.com/dotnet/api/microsoft.azure.documents.resource.id) for details. +- **New data**: If you are creating a new application or database, avoid using these illegal characters in key values, as they are not valid in Cosmos DB resource `id` values. See the [Azure documentation](/dotnet/api/microsoft.azure.documents.resource.id) for details. ## Low-impact changes diff --git a/entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md b/entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md index e6b7735c57..8313236d2b 100644 --- a/entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md +++ b/entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md @@ -2,7 +2,7 @@ title: What's New in EF Core 11 description: Overview of new features in EF Core 11 author: roji -ms.date: 06/09/2026 +ms.date: 06/10/2026 uid: core/what-is-new/ef-core-11.0/whatsnew --- @@ -624,6 +624,48 @@ For the complete list of date/time function translations, see the [SQL Server fu * now defaults to compatibility level 160 (SQL Server 2022), enabling SQL Server 2022-specific translations such as `LEAST` and `GREATEST` by default; see the [breaking change note](xref:core/what-is-new/ef-core-11.0/breaking-changes#sqlserver-compatibility-level-160) for more information. +## SQLite + + + +### Ordering in string aggregation + +EF Core can translate `string.Join` and `string.Concat` over a grouping to SQLite's `group_concat` aggregate function. Starting with EF 11, these translations also support ordering the aggregated values, by applying `OrderBy`/`OrderByDescending` inside the aggregate. Previously, queries that ordered the values fell back to client evaluation. + +For example, the following query concatenates each blog's post titles, ordered by descending post `Id`: + +```csharp +var blogs = await context.Blogs + .Select(b => new + { + b.Name, + Posts = string.Join( + ", ", + b.Posts.OrderByDescending(p => p.Id).Select(p => p.Title)) + }) + .ToListAsync(); +``` + +This translates to the following SQL, which uses `group_concat` with an `ORDER BY` clause: + +```sql +SELECT "b"."Name", COALESCE(group_concat("p"."Title", ', ' ORDER BY "p"."Id" DESC), '') AS "Posts" +FROM "Blogs" AS "b" +LEFT JOIN "Posts" AS "p" ON "b"."Id" = "p"."BlogId" +GROUP BY "b"."Id", "b"."Name" +``` + +Ordering inside `group_concat` requires SQLite 3.44.0 or later. + + + +### UInt128 support + +`Microsoft.Data.Sqlite` can now bind parameter values. The value is stored as a zero-padded, 39-digit text representation, which preserves correct ordering and comparison of values directly in the database. + +> [!NOTE] +> Reading values from data readers is not yet supported. + ## Cosmos DB @@ -856,6 +898,23 @@ Explicit command-line options always take precedence over configuration file val For more information, see [Configuration file](xref:core/cli/dotnet#configuration-file). + + +### Wildcard context support for migration commands + +When a project defines multiple `DbContext` types, several `dotnet ef` commands accept a wildcard (`*`) as the value of the `--context` option to target all contexts at once, instead of running the command separately for each one. The commands that support the wildcard are: + +* `dotnet ef migrations list` — lists the migrations for every context. +* `dotnet ef migrations script` — generates and concatenates a script for every context. +* `dotnet ef database update` — applies migrations to the database of every context (migration bundles are covered as well). +* `dotnet ef database drop` — drops the database for every context. + +For example, the following command lists the migrations for all contexts in the project: + +```dotnetcli +dotnet ef migrations list --context "*" +``` + ## Other improvements * The EF command-line tool now writes all logging and status messages to standard error, reserving standard output only for the command's actual expected output. For example, when generating a migration SQL script with `dotnet ef migrations script`, only the SQL is written to standard output. diff --git a/entity-framework/core/what-is-new/ef-core-6.0/breaking-changes.md b/entity-framework/core/what-is-new/ef-core-6.0/breaking-changes.md index b8ab08ccfc..7f2dab4891 100644 --- a/entity-framework/core/what-is-new/ef-core-6.0/breaking-changes.md +++ b/entity-framework/core/what-is-new/ef-core-6.0/breaking-changes.md @@ -428,7 +428,7 @@ If your application expects joined entities to be returned in a particular order #### Why - was originally made to implement mainly in order to allow direct enumeration on it via the `foreach` construct. Unfortunately, when a project also references [System.Linq.Async](https://www.nuget.org/packages/System.Linq.Async) in order to compose async LINQ operators client-side, this resulted in an ambiguous invocation error between the operators defined over `IQueryable` and those defined over `IAsyncEnumerable`. C# 9 added [extension `GetEnumerator` support for `foreach` loops](/dotnet/csharp/language-reference/proposals/csharp-9.0/extension-getenumerator), removing the original main reason to reference `IAsyncEnumerable`. + was originally made to implement mainly in order to allow direct enumeration on it via the `foreach` construct. Unfortunately, when a project also references [System.Linq.Async](https://www.nuget.org/packages/System.Linq.Async) in order to compose async LINQ operators client-side, this resulted in an ambiguous invocation error between the operators defined over `IQueryable` and those defined over `IAsyncEnumerable`. C# 9 added [extension `GetEnumerator` support for `foreach` loops](https://github.com/dotnet/csharplang/blob/main/proposals/csharp-9.0/extension-getenumerator.md), removing the original main reason to reference `IAsyncEnumerable`. The vast majority of `DbSet` usages will continue to work as-is, since they compose LINQ operators over `DbSet`, enumerate it, etc. The only usages broken are those which attempt to cast `DbSet` directly to `IAsyncEnumerable`.