I am new to Entity Framework and MVC 4, and I am following the tutorial in the Music Store app on the Microsoft website (with some easy adaptations to my needs). I have a remote database created using First code. This includes the SampleData class, which includes information about songs, artists, genres, etc ... and it populates the database with this after creating all the tables. This works fine.
However, I have now made some changes to my SampleData class, and I want it to SampleData the database with this data (delete deleted rows, add new ones that were added, etc.). without dropping the database. My database administrator does not allow me to run the DROP command, so using DropCreateDatabaseAlways with my seed will not work. I did this locally and it works by dropping the database, creating it again with tables (the model is the same) and new data samples.
Any way to do this without dropping the database every time I want to update sample data? Maybe First First Migrations (although my model has not changed, just data)?
source share