views:

50

answers:

1

I have an issue with my Linq to SQL Data Context no submitting in my console application.

The following code is all that there is in the main() method.

BlogRollerDataContext bdc = new BlogRollerDataContext();
bdc.Urls.InsertOnSubmit(new Url()
    { 
        Approved = false, 
        UrlTo = "http://www.google.com/", 
        UrlFrom = "" 
    });
bdc.SubmitChanges();
A: 

This might help you.

Shimmy
But I can pull data from the database, and it only exists on my development laptop, so there is no chance for the connection string to be incorrect.
Jeremy
Do you see exceptions or the data is just not submitted?
Shimmy
After reading all the comments I found the answer. Thank you.
Jeremy
It was because of the DB being over written each time i would build the application.
Jeremy
So glad to hear.
Shimmy