We use the queries created by Linq to retrieve the data, but for INSERT and UPDATE we do not allow the generated SQL, but restrict the use of stored procedures.
I connected the Update and Insert behavior in DBML to stored procedures. Procedures are called, data is inserted / updated = everything, if accurate, except for optimistic concurrency .
If the record was changed between search and update, the update should fail.
When Linq generates the update request itself, it throws a ChangeConflictException , as expected, but an exception is thrown when using the stored procedure .
Thanks for the help!
source share