I have used Entity Framework to generate models for database before. The thing is that Entity Framework generate the model for a specific provider (SQL Server, Oracle, etc ..). How can I generate a model that may work with many providers.
我以前使用Entity Framework为数据库生成模型。问题是实体框架为特定提供者(SQL Server,Oracle等)生成模型。如何生成可与许多提供程序一起使用的模型。
I thought about handcrafting my own Data Access Layer using the DbProviderFactory
class. But building the model from scratch involves a lot of work this is why I was wondering if I could generate an Entity Framework Model which works with more than one provider?!!!
我想过使用DbProviderFactory类手工制作我自己的数据访问层。但是从头开始构建模型涉及很多工作,这就是为什么我想知道我是否可以生成一个与多个提供商一起工作的实体框架模型?
1 个解决方案
#1
0
You should probably read the following article: http://www.codeproject.com/Articles/82017/Preparing-an-Entity-Framework-model-for-multi-prov.aspx
您应该阅读以下文章:http://www.codeproject.com/Articles/82017/Preparing-an-Entity-Framework-model-for-multi-prov.aspx
#1
0
You should probably read the following article: http://www.codeproject.com/Articles/82017/Preparing-an-Entity-Framework-model-for-multi-prov.aspx
您应该阅读以下文章:http://www.codeproject.com/Articles/82017/Preparing-an-Entity-Framework-model-for-multi-prov.aspx