views:

66

answers:

3

Hey all, I have a linq app using C# express2008 and sqlserver express 2005 (mdf file connection) I followed the regular dml generation and vanilla datacontext. However i created a repository class to manage the Linq stuff. In using the functions, selecting data works fine, updating data works in the app.But when i check the data in the tables, nothing has changed.Needless to say, when i close the app, also no change. I used SQL profiler to see what was being sent to sqlserver express, nothing showed up.

What could be my issues?

+3  A: 

Are you calling SubmitChanges() on the DataContext?

Scott Lance
Yep that is in my Save() function of the repository
D0cNet
A: 

No primary key, or no column(s) in the L2S model marked as primary key member(s)..?

KristoferA - Huagati.com
A: 

Ok... found 'a' soln. 1. changed (forced) default connection string from looking at a file to an instance of sql server (using database instead of file) 2. Attached file to sql server express..and renamed the db.

Ran app again and everything works. Only thing is..the dml still uses the old connection string..so any mods to tables have to be done in sqlserver. This is just my quicky patch, anyone care to provide a more elaborate view?

D0cNet