Why to use fluentmigrator?

2019-07-26 09: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

3条回答
戒情不戒烟
2楼-- · 2019-07-26 09:28

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.

查看更多
Rolldiameter
3楼-- · 2019-07-26 09:31

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.

查看更多
Deceive 欺骗
4楼-- · 2019-07-26 09:41

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.

查看更多
登录 后发表回答