How to run an SQL script against a MDF file?
问题 I've created a database model with model-first method using Entity Framework 4.0. I then created an sql script using the Generate Database from Model... I've also created an SQL Server Database file in my App_Data folder. How do I now run the SQL file against this MDF file? I'm using Visual Studio 2010. 回答1: I ran into this same problem and here is what worked for me. When I selected "Generate Database from Model..." I created a new MDF file. This process worked fine and Visual Studio