Skip to content

Commit

Permalink
add ef core 10 documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmontemagno authored Feb 11, 2025
1 parent 89b56fa commit 8bcfa99
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions release-notes/10.0/preview/preview1/efcore.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,34 @@

.NET 10 Preview 1 includes new Entity Framework Core features & enhancements:

- [Feature](#feature)
- [ExecuteUpdateAsync now accepts a regular, non-expression lambda](#executeupdateasync-now-accepts-a-regular-non-expression-lambda)
- [Several query improvements](#query-improvements)

Entity Framework Core 10:
Entity Framework Core 10 updates:

- [What's new in Entity Framework Core 10](https://learn.microsoft.com/ef/core/what-is-new/ef-core-10.0/whatsnew) documentation
- [Breaking change in Entity Framework Core 10](https://learn.microsoft.com/ef/core/what-is-new/ef-core-10.0/breaking-changes)


## Feature
## ExecuteUpdateAsync now accepts a regular, non-expression lambda

This is something about the feature
Creating expresion trees can be verbose, and now you can use regular, non-expression lambdas when calling `ExecuteUpdateAsync`:

```c#
await context.Blogs.ExecuteUpdateAsync(s =>
{
s.SetProperty(b => b.Views, 8);
if (nameChanged)
{
s.SetProperty(b => b.Name, "foo");
}
});
```

Thanks to [@aradalvand](https://github.com/aradalvand) for proposing and pushing for this change (in [#32018](https://github.com/dotnet/efcore/issues/32018)).

## Query improvements

- Translation for DateOnly.ToDateTime(timeOnly) ([#35194](https://github.com/dotnet/efcore/pull/35194), contributed by [@mseada94](https://github.com/mseada94)).
- Optimization for multiple consecutive `LIMIT`s ([#35384](https://github.com/dotnet/efcore/pull/35384)), contributed by [@ranma42](https://github.com/ranma42)).
- Optimization for use of `Count` operation on `ICollection<T>` ([#35381](https://github.com/dotnet/efcore/pull/35381)), contributed by [@ChrisJollyAU](https://github.com/ChrisJollyAU)).

0 comments on commit 8bcfa99

Please sign in to comment.