Replies: 2 comments 1 reply
-
This refers to the |
Beta Was this translation helpful? Give feedback.
-
update (and insert) operations support two modes:
Issue you mentioned is about adding alternative explicit syntax using |
Beta Was this translation helpful? Give feedback.
-
How would I go about doing the equivalent to the following SQL in Linq2Db? I've used the Merge to update all columns in a record before but I'm not sure how or if it's possible to do this for a few selected columns.
SQL
Having thought about this before, I was surprised to find that this actually seems to work
The documentation (https://linq2db.github.io/articles/sql/merge/Merge-API-Description.html#setter-1) is not clear, as it says: "When not specified, source record values used to update target record". This can be read as Properties not specified or the setter is not specified and I'm not sure which it means.
Also there is another thread (#4239) which requests the Set() function, as used elsewhere in Linq2Db is added to the Merge, which I agree would be a nicer solution.
If you can clarify how this works, that would much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions