Reputation: 3011
Using MVC 4 With EntityFramework, is there a way to create my stored procedures during the execution of a given migration (just after the scaffolded table creations, for insitance)? This would surely make my deploys easier, since no external SQL script would be necessary for setting up the DataBase.
If so, what would be the syntax for it?
Upvotes: 0
Views: 50
Reputation: 5489
You can run arbitrary SQL command as a part of your migration.
public override void Up() {
Sql("CREATE PROCEDURE ...");
}
Upvotes: 1