posted by 네코냥이 2014. 11. 6. 12:04

Do I need to SubmitChanges after executing a stored procedure with Linq-To-Sql?


답변1


No you don't. The code will work. Submit changes is only concerned with modified LINQ to SQL objects and not stored procs.


답변2


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.