I am experiencing exactly this problem (and am in exactly the same world of pain): ChangeConflictException in Linq to Sql update
Whereby I am offering an update to SQL using LinqToSQL and it is failing with a ChangeConflictException
because NOCOUNT
is set to ON
.
Due to legacy databases also on the server I am targeting, I am not able to re-configure the default connection settings as is quite rightly stated in the accepted answer in ChangeConflictException in Linq to Sql update.
My question is: How do you convince LinqToSQL to run a SQL SET NOCOUNT OFF
before executing an update?