LINQ InsertOnSubmit, DeleteOnSubmit and SubmitChanges not working

By admin - Last updated: Sunday, February 1, 2009 - Save & Share - One Comment

I had the same problem with SQLExpress database file.
In one word, I looked at the records from the wrong database. There were actually two versions of the database file.

The mdf file gets copied over to bin\debug\data folder e.g. bin\debug\data\test.mdf after compilation, but I verify the data against the one within solution.
This likely happens when playing around with LINQ within console application or windows form application.

I was viewing the data from data\test.mdf, but the changes of my LINQ made against bin\debug\data\test.mdf

LINQ SQL not saving records diagnostics

LINQ SQL not saving records diagnostics

In order to avoid this,

Posted in LINQ • Tags: , Top Of Page

One Response to “LINQ InsertOnSubmit, DeleteOnSubmit and SubmitChanges not working”

Comment from FernandoJS
Time August 19, 2009 at 2:05 pm

Great solutions!

Thanks a Lot!

Write a comment

CAPTCHA image