[Ignore] atbt discerning Insert/Update#722
Conversation
There was a problem hiding this comment.
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