For anyone familiar with Python/Django and the South migration module, I'm trying to find the asp.net MVC3 version if it exists.
What I'm trying to accomplish is create an entity, insert data, and in the future change my model and have the database incorporate the new data appropriately. I want to avoid manual SQL changes.
Does this exist in C# and is it reliable? I'开发者_运维知识库ve read a bit about the DBInitializers, I'm not really okay with deleting all my data, test data or not, every time an entity needs an update.
Third party package is an acceptable solution (preferably from NuGet) if it has an active user base.
It sounds like you're looking for a good combo ORM and migrations tool. I'm not super familiar with Django, but I've done some work with Rails, and at a glance South looks a bit like ActiveRecord + rake. Does that sound accurate?
The best ORM I've worked with for .NET is EntityFramework 4.1 (i.e. - EF Code First) which is available here. It just happens to be the most downloaded package on NuGet.
Microsoft has released a migrations package for EF that's also available on NuGet. Scott Haneslman blogged about it a little while back.
You could also look into NHibernate as some people swear by it. I've personally never used it, but I've heard great things.
Hopefully that gets you started in the right direction.
// Edit
Doing a little bit more digging around on NuGet, I stumbled on Fluent Migrator which looks promising. Perhaps a better alternative to the EF Migrations package for now...
精彩评论