-
-
Notifications
You must be signed in to change notification settings - Fork 510
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
[Ignore] atbt discerning Insert/Update #722
base: master
Are you sure you want to change the base?
Conversation
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 would suggest to not introduce a new attribute in this case,
we can use the same Ignore
attribute and add optional parameters to select which operation should be ignored.
[Ignore(IgnoreOperation.OnInsert)]
// [Ignore(IgnoreOperation.OnUpdate)]
// [Ignore(IgnoreOperation.Always)] // the default option
public string Name { get; set; }
Nice feature!, I suggested to reuse the existing |
@ahmad-moussawi also about considerKeys, on Update/Insert, i was thinking that when is true it should be able to put the Where despite this attb being [Ignore], in my case we are using [Key, Ignore] for Ids, bcos they auto generate in db but for keys we want to insert we just avoid the [Ignore], but i need to put myself for the update.Where(keys, keys.value) more than 1 where if needed for complex keys, but if we would leave this outside can be usefull. What d u think. Instead of |
@ahmad-moussawi changes aplied + UT to check the ignore on diferent cases. |
#721 Related issue