Execute SQL script using Entity Framework Code First in ASP.Net

jmontano
 
on Jun 07, 2020 02:57 AM
1104 Views

How can I run the sql code generated by EF Code First in VB.Net, without having to execute the enable-migrations, ADD-MIGRATION INITIAL and UPDATE-DATABASE commands
Well, the generated code will include it in the main menu of the application so that I can create the database or update it if it exists.

Taking as reference the article of the following link:

https://stackoverflow.com/questions/13593845/how-to-create-a-view-using-ef-code-first-poco

Any ideas?

Download FREE API for Word, Excel and PDF in ASP.Net: Download