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
.
'.NET > .NET' 카테고리의 다른 글
[ASP.NET] Server.Transfer 와 함께 데이터 전송하기 (1215) | 2015.04.17 |
---|---|
[APS.NET] Posting across pages (292) | 2015.01.08 |
[MVC] ApiController와 Controller의 차이점 (293) | 2014.10.04 |
[ASP.NET] UpdatePanel 의 변덕 (332) | 2014.06.19 |
.NET 어플리케이션(웹) 일부만 중단시키기 (286) | 2014.05.13 |