Here's the story: I created a SQL Compact 3.5 database and used SQLMetal.exe to generate DataContext for it. It worked well, but soon I realized that it simply does not suit my needs so I decided to go for SQL Express 2008. I fired up the very same SQL script I used for the Compact to create schema and then fired up SQLMetal.exe tool. I didn't expected the generated DataContext to be different, but I was missing all the relations for some reason.
Here's the SQL Compact commandline:
SQlMetal.exe /code:MyCode.cs MyDatabase.sdf
And here's the SQL Express 2008:
SQlMetal.exe /code:MyCode.cs /server:MyServer /database:MyDatabase
Any ideas?