I have a few tables that are created by entity framework that house my region and country data. I have a couple SQL scripts that I run after the model is updated, but it is becoming annoying to keep doing that. I would like to automate this a bit. Would I load my script into the Database.ExecuteSqlCommand() method of the context or is there a better way of dealing with this?
Share
No if you want automatic way there is no better approach then implementing derived initializer and use override
Seedmethod which will load your scripts and execute them. That is whySeedmethod exists.