-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Added TryGetValue<T> for Properties - fix #21343 #21911
Conversation
/// any release. You should only use it directly in your code with extreme caution and knowing that | ||
/// doing so can result in application failures when updating to a new Entity Framework Core release. | ||
/// </summary> | ||
public override bool TryGetValue<TValue>(string propertyName, out TValue value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be re-implemented in subclass overrides? It looks like maybe the implementation can be common and in the base class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't found a base, only abstract classes. I have implemented the method on concrete classes that implement the PropertyValues
abstract class. This is my first PR on this project, maybe I missed something. Can you give me some clue ? Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ajcvickers I understand you prev message, sorry I implement the code in the PropertyValues
class.
@m4ss1m0g Looking better, but tests are failing. Take a look at Getting and building the code for how you can run all the tests locally. |
The line |
@m4ss1m0g Thanks for the contribution! |
Summary of the changes
Microsoft.EntityFrameworkCore.ChangeTracking.PropertyValues
the methodpublic abstract bool TryGetValue<TValue>([NotNull] string propertyName, out TValue value);
°
CurrentProertyValues
°
ArrayPropertyValues
°
OriginalPropertyValues
test/EFCore.Tests/ChangeTracking/Internal/PropertyValuesTest.cs
Fixes #21343