Sqlite ADO.NET Entity Framework 3.5 ASP.NET MVC Simple Example "Race Condition" -
Sqlite ADO.NET Entity Framework 3.5 ASP.NET MVC Simple Example "Race Condition" -
i have simple illustration trying create spike using asp.net mvc 1, sqlite, , ado.net entity framework need portable datastore (db) can run on .net 3.5
i have simple spike working (saving, deleting, modifying records) noticed strange. using extremely simple repository pattern in order manipulate data.
if run site shows new record created. noticed if refresh (hold downwards f5 illustration in browser replicate) throw exception below.
store update, insert, or delete statement affected unexpected number of rows (0). entities may have been modified or deleted since entities loaded. refresh objectstatemanager entries.
i sense concurrency issue way index action saving/deleting records test. how can modify repository can still utilize pattern (which , think clean) yet prevent race condition? went ahead , zipped solution below should work out of box (visual studio 2008)
http://andrewherrick.com/spike/sqlitemvc1ef.zip
asp.net-mvc entity-framework sqlite
Comments
Post a Comment