Closed BrendaSplenda closed 1 month ago
@BrendaSplenda From a relational perspective, the code is showing EF making both an UPDATE
and an INSERT
when SaveChanges
is called. In terms of the comment, it refers to generally "updating" (i.e. "changing") the object graph and then letting EF work out the updates needed.
@ajcvickers, thanks for your reply. I suggest putting that very explanation in the documentation, as otherwise the "update" title will confuse newbies. (If they weren't newbies, they probably wouldn't need the documentation to begin with.)
Type of issue
Other (describe below)
Description
Regarding the following code sample:
This is really an "Add" operation, not "Update". The comment perhaps needs an adjustment or clarification. Thank You!
Page URL
https://learn.microsoft.com/en-us/ef/core/get-started/overview/first-app?source=recommendations&tabs=netcore-cli
Content source URL
https://github.com/dotnet/EntityFramework.Docs/blob/main/entity-framework/core/get-started/overview/first-app.md
Document Version Independent Id
b38b9d14-6bad-12e0-8d2d-24b50bc4977e
Article author
@Rick-Anderson