ADO Entity SubmitChanges not submitting
I am using a domain service class associated with a Linq-to-Sql context. Using breakpoints, it successfully adds,
context.Company.Add(NewCompany);
I am calling this from Silverlight, but the salutary part seems to fail ...
context.SubmitChanges();
As in I am not getting errors and adding to the database. All my tables are related to each other, as "Company" is related to "Address", did I skip a step?
0
a source to share
2 answers
If you are using a file database (mdf, sdf, mdb ...):
Check the properties of a database project item for which the Copy to Output Directory property is set to Do Not Copy or Copy If New. Otherwise, the database file in the output directory will be overwritten every time you compile. It's pretty dumb, but this is the default behavior in VS ...
0
a source to share