LINQ to SQL - How do stored procedures interact with unsubmited datacontext changes?

FWIW, our litmus test is any trivial 'crud' type PROC which inserts / updates a single record can move across to an ORM.

FWIW, our litmus test is any trivial 'crud' type PROC which inserts / updates a single record can move across to an ORM However, we tend to leave the more advanced procs (batch updates, or highly performance sensitive ones) 'as is'. But yes, you will need to have called SubmitChanges() before calling a Proc which is dependent on the state of data changed in the DataContext Possibly unrelated, if you need to control units of work, look at putting TransactionScopes around your code?

If you need to control units of work, look at putting TransactionScopes". Or just manually open a connection, start a transaction in it and supply that connection to one of the DataContext's constructors. – Steven Aug 6 '10 at 15:15.

If you update records via stored proc, your loaded (and tracked) objects may become stale. If you call SubmitChanges with stale objects, you'll get concurrency exceptions. You can refresh a stale object using the Refresh method on DataContext.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions