When you close and restart the program does your ids start back at 1. If you have access to SQL profiler, it might help see what SQL commands are hitting your sql [email protected] I just recently learned how to use LINQ to SQL in reading Head First C#.What I just read is how to get data from the database.The Data Context still has a full recording of all changes.You can therefore try to correct the problem and call Submit Changes again, as in the code example that follows.If it is non-zero, then either you are inside a transaction which is not getting completed (eg a Transaction Scope which isn't getting completed) or the record is being saved correctly.For transactions see stackoverflow.com/questions/542525/… - but it is unlikely you are using it without knowing (unless you copied someone elses code). Connection String to make sure your program is accessing the correct database and make sure nothing is deleting the records or even deleting/recreating the database.I enjoyed coding until I got stocked up with this 'not updating' Submit Changes() method to the database(but updates the context).
Right now you are not getting it out of the database when you create your Database Data Context.
this._Walking = value; All I had to do was change this to this.
I am having difficulties UPDATING the databes via LINQ to SQL, inserting a new record works fine.
I'm not 100% sure about LINQ but i would say that the seperation is based on transaction control.
You apply any number of updates, inserts or deletes.