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
Fix to ignore Unmapped properties in Delta<T> #2544
Conversation
@@ -54,4 +57,26 @@ public class AutoExpandChoiceOrder | |||
public int Id { get; set; } | |||
public string Name { get; set; } | |||
} | |||
|
|||
public class NewCustomerUnmapped |
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.
maybe add a [DataMember] attribute to a property that also has [IgnoreDataMember] and validate that property is serialized if [DataContract] is not applied to the type. Also a property with no attribute, which should get serialized for a class not marked with [DataContract]. #Resolved
public int Id { get; set; } | ||
[IgnoreDataMember] | ||
[DataMember] | ||
public string Name { get; set; } |
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.
Just to cover all of the possibilities, should probably have a property with just the [DataMember] attribute and a property with no attributes. #Resolved
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.
🕐
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.
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.
🕐
var properties = delta.GetUnchangedPropertyNames().ToList(); | ||
|
||
//Assert | ||
Assert.Equal(2, properties.Count); |
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.
Assert.Equal(2, properties.Count); [](http://example.com/codeflow?start=0&length=48)
shouldn't "Id" be returned?
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.
LGTM
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.
02e9aff
to
423150d
Compare
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
Issues
This pull request fixes issue #2532
Description
Fix to ignore Unmapped properties in Delta
Checklist (Uncheck if it is not completed)
Additional work necessary
If documentation update is needed, please add "Docs Needed" label to the issue and provide details about the required document change in the issue.