Very basic scenario. I have a context attached to a db with one table that has one row in it. I can bind ui to the data and see data just fine, but changes, additions, etc do not save. Below is a 5 line bit that does not result in any changes to the db. Curious and confused.
var context = new TestEntities();
context .DataItems.Load(); // Testing - already one row in the table.
context .DataItems.First().Data = "Blah Blah Blah";
context .DataItems.Add(new DataItem() { Data = "Happy Birthday" });
context .SaveChanges();
The data in the database does not change. No new row. No updated row.
Connection: <add name="TestEntities" connectionString="metadata=res:///DataModel.csdl|res:///DataModel.ssdl|res://*/DataModel.msl;provider=System.Data.SqlServerCe.4.0;provider connection string="data source=|DataDirectory|\TestDB.sdf"" providerName="System.Data.EntityClient" />
I'm sure this is something stupid, but I don't see it.