问题
When and why to use FluentMigrator as Entity Framework does the same job. If I have code- database then structures are already there and EF already provides classes to manipulate database.
I am not clear why and when(in which cases) to use fluentmigrator?
Thanks
回答1:
Not everybody uses Entity Framework. I don't use it in my current project for example. In this scenario FluentMigrator is very useful for managing the database changes for each release.
回答2:
EntityFramework kind of gives you both tasks: ORM and migration (CodeFirst).
I, for instance, use NHibernate and use FluentMigrator. The first as ORM and the second as the database migration library. You could say indeed that I am writing two faces of the same concept so it is more maintenance costs, however, I prefer higher control over this (ORM and migration separately) because you could screw up very easily if it's not explicit up front.
回答3:
Adding to the examples above: in case you use some Micro ORM like Dapper, you'll need a separate tool for database migrations. That's what Fluent Migrator is all about.
来源:https://stackoverflow.com/questions/44603221/why-to-use-fluentmigrator