Skip to content

Commit 47fae9b

Browse files
committed
update whats new for preview 1 (#4953)
1 parent f86d272 commit 47fae9b

File tree

1 file changed

+35
-2
lines changed
  • entity-framework/core/what-is-new/ef-core-10.0

1 file changed

+35
-2
lines changed

Diff for: entity-framework/core/what-is-new/ef-core-10.0/whatsnew.md

+35-2
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,40 @@ EF10 requires the .NET 10 SDK to build and requires the .NET 10 runtime to run.
2424

2525
## LINQ and SQL translation
2626

27+
<a name="support-left-join"></a>
28+
29+
### Support for the .NET 10 LeftJoin operator
30+
31+
`LEFT JOIN` is a common and useful operation when working with EF Core. In previous versions, implementing `LEFT JOIN` in LINQ was quite complicated, requiring `SelectMany`, `GroupJoin` and `DefaultIfEmpty` operations [in a particular configuration](/dotnet/csharp/linq/standard-query-operators/join-operations#perform-left-outer-joins).
32+
33+
.NET 10 adds first-class LINQ support for `LeftJoin` method, making those queries much simpler to write. EF Core recognizes the new method, so it can be used in EF LINQ queries instead of the old construct:
34+
35+
```C#
36+
var query = context.Students
37+
.LeftJoin(
38+
context.Departments,
39+
student => student.DepartmentID,
40+
department => department.ID,
41+
(student, department) => new
42+
{
43+
student.FirstName,
44+
student.LastName,
45+
Department = department.Name ?? "[NONE]"
46+
});
47+
```
48+
49+
See [#12793](https://github.com/dotnet/efcore/issues/12793) for more details.
50+
2751
<a name="other-query-improvements"></a>
2852

2953
### Other query improvements
3054

3155
* Translation for DateOnly.ToDateTime(timeOnly) ([#35194](https://github.com/dotnet/efcore/pull/35194), contributed by [@mseada94](https://github.com/mseada94)).
32-
* Optimization for multiple consecutive `LIMIT`s ([#35384](https://github.com/dotnet/efcore/pull/35384)), contributed by [@ranma42](https://github.com/ranma42)).
33-
* Optimization for use of `Count` operation on `ICollection<T>` ([#35381](https://github.com/dotnet/efcore/pull/35381)), contributed by [@ChrisJollyAU](https://github.com/ChrisJollyAU)).
56+
* Optimization for multiple consecutive `LIMIT`s ([#35384](https://github.com/dotnet/efcore/pull/35384), contributed by [@ranma42](https://github.com/ranma42)).
57+
* Optimization for use of `Count` operation on `ICollection<T>` ([#35381](https://github.com/dotnet/efcore/pull/35381), contributed by [@ChrisJollyAU](https://github.com/ChrisJollyAU)).
58+
* Optimization for `MIN`/`MAX` over `DISTINCT` ([#34699](https://github.com/dotnet/efcore/pull/34699), contributed by [@ranma42](https://github.com/ranma42)).
59+
* Translation for date/time functions using `DatePart.Microsecond` and `DatePart.Nanosecond` arguments ([#34861](https://github.com/dotnet/efcore/pull/34861)).
60+
* Simplifying parameter names (e.g. from `@__city_0` to `city`) ([#35200](https://github.com/dotnet/efcore/pull/35200)).
3461

3562
## ExecuteUpdateAsync now accepts a regular, non-expression lambda
3663

@@ -76,3 +103,9 @@ await context.Blogs.ExecuteUpdateAsync(s =>
76103
```
77104

78105
Thanks to [@aradalvand](https://github.com/aradalvand) for proposing and pushing for this change (in [#32018](https://github.com/dotnet/efcore/issues/32018)).
106+
107+
<a name="other-improvements"></a>
108+
109+
## Other improvements
110+
111+
* Make SQL Server scaffolding compatible with Azure Data Explorer ([#34832](https://github.com/dotnet/efcore/pull/34832), contributed by [@barnuri](https://github.com/barnuri)).

0 commit comments

Comments
 (0)