Why to use fluentmigrator?

青春壹個敷衍的年華 提交于 2020-01-05 04:11:11

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!