text: Q:
  
  How to update changes made to SampleData Seed in C# without dropping database?
  
  I'm new to Entity Framework and MVC 4, and I've been following the Music Store application tutorial on Microsoft's website (with some light adaptations to my needs). I have a remote database created using Code First. This includes a SampleData class that includes info about songs, artists, genres, etc...and it populates the database with this after creating all the tables. This is working fine.
  However, now I've made some changes to my SampleData class, and I want it to update the database with that data (delete the rows that were removed, insert new ones that were added, etc...) without dropping the database. My database admin does not allow me to run a DROP command, so using DropCreateDatabaseAlways with my Seed isn't going to work. I've done this locally and it works, dropping the database, creating it again with the tables (the model is the same) and the new sample data.
  Any way to do this without having to drop the database each time I want to update the sample data? Maybe Code First Migrations (even though my model has not changed, just the data)? 
  
  A:
  
  This method is depreciated, just skip to the bottom.
  You can use code first data migrations.
  In order to update your sample data (which is called seed data in EF), you can edit Configuration.cs in your Migrations folder and add or update the data you want to change there like this:
  protected override void Seed(icicle.Models.icicleEntities context)
  {
      //  This method will be called after migrating to the latest version.
  
      //   You can use the DbSet<T>.AddOrUpdate() helper extension method 
      //   to avoid creating duplicate seed data. E.g.
  
      context.Widgets.AddOrUpdate(new Widget()
      {
           Id = 1,
           Name = "My Really Awesome Widget"
      });
  }
  
  Under the new paradigm, you just have to go to Tools->Library Package Manager->Package Manager Console and run the following line of script:
  Update-Database -ConnectionStringName "YourConnectionStringNameGoesHere" -Verbose
  
  