I am using Entity Framework Code First and I would like to generate C# code for seeding data from data that already exists in the database. Right now, populating DropCreateDatabaseIfModelChanges.Seed() seems to be a completely manual process where the developer creates the objects and fills in the values. This is somewhat manageable if developers are the only ones that are responsible for seeding the data, but I'd imagine that this is often not the case.
In my particular case, there are non-developers that help populate the database through the use of some MVCScaffolding generated input forms. The data that they add really does fall into the "seed data" category so I want to include their newly added rows into my Seed() implementation. One could simply interpret this as a "Generate C# code INSERT script" function.
Thanks!
The best solution that I've come with for dealing with this can be seen here: https://stackoverflow.com/a/29785119/277992
It's not generating C# code, but I can rapidly seed data into a newly created database. I can update the seed data using SSMS "Edit Data" functionality and then regenerate another INSERT script.