Watch the video
My problem is that the smallest change in the code that creates my previous records are destroyed
Using entity framework
http://www.4shared.com/document/mCo1INnQ/Untitled.html
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sam HobbsPosted Dec 1, 2011, 4:18 PM
I think that if you had just said that much then there are many members that would have understood the problem. Your video is quite large so it is too large for many members to download.
Congratulations on accomplishing as much as you have accomplished. The solution to theis problem is very easy.
When you create the project, it says something about the database not being in the project. I did not see what button you clicked but you probably clicked on "Yes" to copy the database. So what is happening is that every time the project is built, the database is copied to the project and the previous copy of the database is "destroyed". Microsoft does that so that the project will always use the same data for testing purposes. We often do not want to do that, so when you create the project, you should answer "No" to the question of whetehr to copy the database. Then voila! the data you create and modify during testing will stay there. You can change the property after the project is created, but I forget the details. So try this; in the Solution Explorer, right-click on the data soruce (the edmx file) then choose Propeties. In the properties look for "Copy to Output Directory"; if it is not set to "Do not copy" then set it to that. I hope all your hard work will then be rewarded.