Why are my LINQ INSERTS not persisting in SQL Server CE 3.5?
I am using LINQ to SQL with Sql Server Compact Edition 3.5 and VS2008. I have a very simple table (Tokens) with a uniqueidentifier primary key (TokenID) and two other nullable fields (UsedBy and UsedOn). I am trying to use LINQ to insert new rows into the table but for some reason they are not persisting. Here is my code: var connectionstring = "Data Source=|DataDirectory|\\MyData.sdf"; MyData db = new MyData(connectionstring) { Log = Console.Out }; Tokens token = new Tokens { TokenID = Guid.NewGuid() }; db.Tokens.InsertOnSubmit(token); //db.GetChangeSet(); db.SubmitChanges(); var tokens =