注册

.Net 驱动问题:使用EFDmProvider.EF6驱动,运行 EntityFramework报错。

Alex 2021/09/17 1315 1 已解决

【DM版本】:8
【操作系统】:windows 10
【CPU】: intel
【问题描述】*:

  • 已按《达梦程序员手册》,“5.5 EFDmProvider.EF6 方言包”章节配置了web.config文件。
  • 且已引用了DmProvider\net20\DmProvider.dll 和 EFDmProvider6.1.3-net45\EFDmProvider.EF6.dll
  • .net 框架版本: 4.5.2
  • Entity Framework版本:6.1.3

错误提示:

System.Data.Entity.Core.ProviderIncompatibleException: 
对类型“Dm.DmConnection”的存储区提供程序实例调用“get_ProviderFactory”方法后,返回 null。
存储区提供程序可能没有正确运行。

调用堆栈:

System.Data.Entity.Core.Common.DbProviderServices.GetProviderFactory(DbConnection connection) +122
   System.Data.Entity.Utilities.DbConnectionExtensions.GetProviderInvariantName(DbConnection connection) +40
   System.Data.Entity.Internal.InternalConnection.get_ProviderName() +38
   System.Data.Entity.Internal.LazyInternalConnection.get_ProviderName() +21
   System.Data.Entity.Internal.LazyInternalContext.get_ProviderName() +11
   System.Data.Entity.Internal.DefaultModelCacheKeyFactory.Create(DbContext context) +92
   System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +515
   System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +18
   System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() +53
   System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext() +15
   System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() +38
   System.Linq.Queryable.Where(IQueryable`1 source, Expression`1 predicate) +85
.....

貌似驱动程序的问题,求助问题可能出在哪?

回答 0
暂无回答
扫一扫
联系客服