Hi,
I'm working on a small application which uses a sql ce database. I chose version 3.5 sp2 because I want to use linq.
I created a database, added tables and relations and generated a .dmbl file to use linq. Everything works.
Now I want to be able to delete the current database, create a new one and use linq to query it at runtime.
I found this to create a new database:
string cs = @"Data Source='c:\data.sdf'";
using (SqlCeConnection conn = new SqlCeConnection(cs)) {
MyDataContext db = new MyDataContext (conn);
db.CreateDatabase();
But how do I get my old structure with all tables and relations back? I could create everything again manually with SQL queries but isn't there another better way like generating the structure from the .dbml file or the dataset?
I'm sorry if this is a really dumb question but I'm really new to SQL CE and databases in general so I hope you can help me out :)
Thanks,
Sebastian