It is frustrating if even after you have done unit testing to your program, there will be always another type of error when you try to execute it in real environment. After testing for around 2 weeks, I still deal with type of error which is probably first time to me. This morning when I created new console application in Visual C#, I encountered error stated An entity object cannot be referenced by multiple instances of IEntityChangeTracker.
It turned out that this error related to adding new record using Entity Data Framework. I actually have known how to add new instance into EDF before around 1 year ago. It just happened that after that, I never touched this thing since my last company only used .NET 2.0 for their website.
It took me quite a while before I realized the source of the error in the code below:
View original post 86 more words