views:

235

answers:

1

I am in love with the rails style of updating db schema. I can define a migration as a class with fairly simple, yet powerful syntax. I can run the updates with a single command and all of my models are updated. They are committed to source control and can be easily read, modified, and undone.

My current way of doing it for my asp.net mvc project is to open up the server explorer, manually change the database fields, then regenerate all of my linq-to-sql classes. This method is cumbersome, error prone, and lacks almost all of the advantages listed above. I am fairly sure there has to be a better way.

Can anybody enlighten me?

+2  A: 

Rob Conery's Subsonic has something like migrations in .NET:

http://blog.wekeroad.com/2007/10/03/subsonic-migrate-me/

There are plenty of other toolkits offering similar approaches:

I'm sure there are more out there.

marc_s
Thank you. I chose to go with Migrator.net because I like the migration coding style the best. I found it a little bit of a pain to get installed and working with my build, but once I got it it works fine.
CaptnCraig