Reputation: 294
How to create a SQL Server database using Entity Framework databbase-first code?
I've mistakenly deleted the database from SQL Server, but I've added EDO in model at my VS 2017 project. So, now I've EDO code, can I restore database with the help of that code ?
Upvotes: 1
Views: 2270
Reputation: 416
Exporting an Entity Data Model to a SQL-Server database
Upvotes: 0
Reputation: 1417
If you are able to open edmx
in Model Browser
in Visual Studio
, you can generate script for database by right clicking on edmx
diagram. Select Generate Database from Model
.
FYI : This will generate only basic structure. Not stored procedure, udf's etc.
And you will get script as below.
Upvotes: 1