Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plan for Entity Framework Core 7.0 #3624

Merged
merged 6 commits into from
Dec 15, 2021
Merged

Plan for Entity Framework Core 7.0 #3624

merged 6 commits into from
Dec 15, 2021

Conversation

ajcvickers
Copy link
Contributor

No description provided.

@ajcvickers ajcvickers requested a review from a team December 15, 2021 12:36

[Change tracking](xref:core/change-tracking/index) followed by [SaveChanges](xref:core/saving/index) is the primary mechanism in EF Core for inserting, updating, and deleting entities. This mechanism ensures that database operations are ordered to satisfy constraints, and that tracked entities are kept in sync with the changes made to the database. However, it requires a database roundtrip to load entities into memory in order to create the appropriate database commands, followed by a database roundtrip to execute these commands.

In contrast, bulk, or set-based, updates involve defining the changes that should be made to the database and then executing those changes without first loading entities into memory. This can be significantly faster than tracked updates, especially when the same modification must be applied to many different entities/rows.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In contrast, bulk, or set-based, updates involve defining the changes that should be made to the database and then executing those changes without first loading entities into memory. This can be significantly faster than tracked updates, especially when the same modification must be applied to many different entities/rows.
In contrast, bulk, or set-based, updates involve defining the changes that should be made to the database and then executing those changes without first loading entities into memory. In SQL, bulk updates are applied by sending statements such as `UPDATE [Blogs] SET [Rating] = [Rating] + 1`. This can be significantly faster than tracked updates, especially when the same modification must be applied to many different entities/rows.


This feature will introduce a common mechanism and patterns for JSON support that can be implemented by any database provider. We will work with the community to align existing implementations for [Npgsql](https://github.com/npgsql/efcore.pg) and [Pomelo MySQL](https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql), and also add support for SQL Server and SQLite.

### Bulk updates
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to be very clear that we don't plan on doing bulk insert (also added sentence below)...

Suggested change
### Bulk updates
### Bulk updates and deletes

entity-framework/core/what-is-new/ef-core-7.0/plan.md Outdated Show resolved Hide resolved
entity-framework/core/what-is-new/ef-core-7.0/plan.md Outdated Show resolved Hide resolved
entity-framework/core/what-is-new/ef-core-7.0/plan.md Outdated Show resolved Hide resolved

New LINQ operators have recently been added to the BCL, and we expect more to be added going forward. Issue [#25570](https://github.com/dotnet/efcore/issues/25570) tracks adding support for these to the EF7 LINQ provider. This issue will be updated as new LINQ operators are added. As with all existing LINQ operators, we will only add support when the operator has a reasonable and useful translation to the database.

### Open telemetry for ADO.NET providers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Open telemetry for ADO.NET providers
### OpenTelemetry for ADO.NET providers


Tracked by [Issue #22336: Standardize on DiagnosticSource/OpenTelemetry for database tracing](https://github.com/dotnet/runtime/issues/22336)

Value proposition: Cross-platform, industry-standard telemetry that can be monitored in your tool of choice.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Value proposition: Cross-platform, industry-standard telemetry that can be monitored in your tool of choice.
Value proposition: Cross-platform, industry-standard telemetry of database traffic that can be monitored in your tool of choice.

entity-framework/core/what-is-new/ef-core-7.0/plan.md Outdated Show resolved Hide resolved

Great performance is a fundamental tenet of EF Core, lower-level data access, and indeed all of .NET. Every release includes significant work on improving performance. As always, this theme will involve a lot of iterative investigation, which will then inform where we focus resources.

### Performance of database inserts and updates
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deletions as well, right? The bulk-set work item is about updates and deletes only (no bulk insert), but the general optimization of the update pipeling + change tracking should help all three.

@ajcvickers
Copy link
Contributor Author

@roji How come you didn't make these suggestions while were doing the internal reviews?

@ajcvickers
Copy link
Contributor Author

Going to merge as-is, since otherwise we will be inconsistent across other parts of the EF7 docs. For example, links to high-level items from the blog.

@roji
Copy link
Member

roji commented Dec 15, 2021

Sorry about that - I did review internally but these didn't occur to me. Though they're mostly cosmetic/text tweaking, no?

ajcvickers and others added 4 commits December 15, 2021 13:03
Co-authored-by: Shay Rojansky <roji@roji.org>
Co-authored-by: Shay Rojansky <roji@roji.org>
Co-authored-by: Shay Rojansky <roji@roji.org>
Co-authored-by: Shay Rojansky <roji@roji.org>
@ajcvickers
Copy link
Contributor Author

Merged the ones that don't impact titles or value props.

@ajcvickers ajcvickers merged commit 8ba028e into main Dec 15, 2021
@ajcvickers ajcvickers deleted the EF7 branch December 15, 2021 13:08
@ajcvickers
Copy link
Contributor Author

@smitpatel Ready for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants