Closed
Description
Similar to the way store-generated values are stored during SaveChanges. This would mean that temporary values would not be stored in or visible in the key property, which would have a few advantages:
- Entities that have are moved from one context instance to another will not incorrectly treat temporary key values as real--see Prevent temporary key values from becoming permanent #10167
- When using data binding, the temporary value will not show up in the data grid--see MaxLength property with adding more than one record on SaveChanges() #12218
The reasons that we didn't do this before were:
- The key value in the entity may not be the key value that EF is using. This can be confusing.
- Fixup could be more complex, but I think our indirections for shadow values, store-generated values, etc. are pretty good now, so I am hopeful this won't be a major problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment