1

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.

2 Answers 2

2

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();
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your answer. This helps me.
0

There is also a Plugin for visual studio code called vscode-dbml that is able to create an sql create script from an dbml file.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.