How much overhead does 'Update Check' have for LINQ UPDATES

后端 未结 5 1144
温柔的废话
温柔的废话 2020-12-14 11:09

I have a simple row that I edit using LINQ. It has about 30 columns, including a primary key numeric sequence.

When an UPDATE is performed through LINQ, the UPDATE s

5条回答
  •  死守一世寂寞
    2020-12-14 12:02

    If you can modify the schema add a column of type rowversion. The latest LINQ to SQL sets the update check to Never for all columns. If you have a timestamp, it will use that as an optimistic lock check, and the system bumps it every time there is an update.

    NOTE: this used to be the Timestamp data type as defined by SQL '92, but the implemented it without any time information so it was not compatible with any other standard system. Maybe that was intentional, who knows.

提交回复
热议问题