'edit link' concurrency exception in tutorial?

Dec 5, 2011 at 9:47 PM

Hello all and Happy Holidays,

After I edit an item and click save, I get the following error:

 "Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. Refresh ObjectStateManager entries." 

 This happens when I run the tutorial I typed in and when I run the completed tutorial project that is included in the zip download.  I am using version 3.0 of the tutorial, Visual Studie 2010 and MVC 3.  I am also getting some first chance concurrencyExceptions in the output window of VS2010.

Can someone point me in the right direction?  Please ask if you need more information from me.

Thanks to the developer(s) for this tutorial, it's very well written and informative.

 

Thanks again,

MyComputerTec

Dec 27, 2011 at 4:31 PM

I have the same problem... How can I manage the concurrency issue?

Dec 28, 2011 at 10:14 AM

I having the problem before, I added the line below in edit.cshtml and it works...

@Html.HiddenFor(model => model.SalesId)

Dec 28, 2011 at 1:35 PM

can you send me the whole cshtml file? I can't find any model.SalesId in the code.. and the cshtml is the same from the completed MVC Music store project dowanload from codeplex

Dec 29, 2011 at 1:32 AM
Edited Dec 29, 2011 at 1:35 AM

That is my sample apps for sales table only, so I use SalesId as the primary key...

I not able to log in, I got alot on connection... haven't figure out yet...