Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion entity-framework/core/learn-more/community-standups.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Comment thread
AndriySvyryd marked this conversation as resolved.

<a name="value-generation"></a>

Expand Down
2 changes: 2 additions & 0 deletions entity-framework/core/providers/sqlite/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
61 changes: 60 additions & 1 deletion entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---

Expand Down Expand Up @@ -624,6 +624,48 @@ For the complete list of date/time function translations, see the [SQL Server fu

* <xref:Microsoft.EntityFrameworkCore.SqlServerDbContextOptionsExtensions.UseSqlServer*> 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

<a name="sqlite-ordered-string-aggregation"></a>

### 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.

<a name="sqlite-uint128"></a>

### UInt128 support

`Microsoft.Data.Sqlite` can now bind <xref:System.UInt128> 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 <xref:System.UInt128> values from data readers is not yet supported.

## Cosmos DB

<a name="cosmos-complex-types"></a>
Expand Down Expand Up @@ -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).

<a name="dotnet-ef-context-wildcard"></a>

### 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ If your application expects joined entities to be returned in a particular order

#### Why

<xref:Microsoft.EntityFrameworkCore.DbSet`1> was originally made to implement <xref:System.Collections.Generic.IAsyncEnumerable`1> 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<T>` and those defined over `IAsyncEnumerable<T>`. 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`.
<xref:Microsoft.EntityFrameworkCore.DbSet`1> was originally made to implement <xref:System.Collections.Generic.IAsyncEnumerable`1> 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<T>` and those defined over `IAsyncEnumerable<T>`. 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`.

Expand Down
Loading