我们可以用MySql使用EF迁移 [英] Can we use EF migrations with MySql
问题描述
理论上是的。实际上,您首先需要从 System.Data.Entity.Migrations.Sql.MigrationSqlGenerator
获取(或创建自己)类,它将负责为MySQL生成SQL。 这里更多关于自定义(或重写)SQL
您还可以等到EF支持ADO.NET提供商的开发人员将此功能包含在其包中。例如 Devart已经开始了他们的迁移支持工作 for甲骨文,MySQL,PostgreSQL和SQLite。
Is there a way to use EntityFramework 4.3 beta with migrations with MySql database? Can we use migrations with MySql Database? Is it possible to use incremental database development with EF code first without me touching the database
Theoretically yes. Practically you first need to get (or create yourselves) class derived from System.Data.Entity.Migrations.Sql.MigrationSqlGenerator
which will be responsible for generating SQL for MySQL. Here is more about customizing (or rewriting) SQL generation.
You can also wait until developers of EF supporting ADO.NET providers include this feature to their packages. For example Devart already started work on their migrations support for thier Oracle, MySQL, PostgreSQL and SQLite.
这篇关于我们可以用MySql使用EF迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!