0

Initially I created database tables and generated DBML class file using Database. (LINQ).

But due to system crash, I lost my database instance ( around 20 tables ) and I want to get it back. ( atlest schema )

Is there any tool/ way to generate SQL from DBML file.

Thanks in advance.

user3538382
  • 11
  • 1
  • 3

1 Answers1

1

You can find a way to do it on msdn. I bit citation:

there is enough information about the relational database that you can create a new instance of the database using the DataContext.CreateDatabase method.

YourDbContext db = new YourDbContext ("c:\\yourDbFile.mdf");
db.CreateDatabase();
teo van kot
  • 12,350
  • 10
  • 38
  • 70