- 异常: System.ArgumentException: 类型为“PurchasingGatherMap”的表达式不能用于方法“System.Data.Entity.ModelConfiguration.Configuration.ConfigurationRegistrar AddRuleDtlEntity”的类型为“System.Data.Entity.ModelConfiguration.EntityTypeConfiguration
1[RuleDtlEntity]”的参数 在 System.Linq.Expressions.Expression.ValidateOneArgument(MethodBase method, ExpressionType nodeKind, Expression arg, ParameterInfo pi) 在 System.Linq.Expressions.Expression.ValidateArgumentTypes(MethodBase method, ExpressionType nodeKind, ReadOnlyCollection
1& arguments)
在 System.Linq.Expressions.Expression.Call(Expression instance, MethodInfo method, IEnumerable1 arguments) 在 Microsoft.CSharp.RuntimeBinder.ExpressionTreeCallRewriter.GenerateCall(EXPRCALL pExpr) 在 Microsoft.CSharp.RuntimeBinder.ExpressionTreeCallRewriter.VisitCALL(EXPRCALL pExpr) 在 Microsoft.CSharp.RuntimeBinder.Semantics.ExprVisitorBase.Dispatch(EXPR pExpr) 在 Microsoft.CSharp.RuntimeBinder.Semantics.ExprVisitorBase.Visit(EXPR pExpr) 在 Microsoft.CSharp.RuntimeBinder.ExpressionTreeCallRewriter.GenerateLambda(EXPRCALL pExpr) 在 Microsoft.CSharp.RuntimeBinder.ExpressionTreeCallRewriter.VisitCALL(EXPRCALL pExpr) 在 Microsoft.CSharp.RuntimeBinder.Semantics.ExprVisitorBase.Dispatch(EXPR pExpr) 在 Microsoft.CSharp.RuntimeBinder.Semantics.ExprVisitorBase.Visit(EXPR pExpr) 在 Microsoft.CSharp.RuntimeBinder.ExpressionTreeCallRewriter.Rewrite(TypeManager typeManager, EXPR pExpr, IEnumerable
1 listOfParameters)
在 Microsoft.CSharp.RuntimeBinder.RuntimeBinder.CreateExpressionTreeFromResult(IEnumerable1 parameters, ArgumentObject[] arguments, Scope pScope, EXPR pResult) 在 Microsoft.CSharp.RuntimeBinder.RuntimeBinder.BindCore(DynamicMetaObjectBinder payload, IEnumerable
1 parameters, DynamicMetaObject[] args, DynamicMetaObject& deferredBinding)
在 Microsoft.CSharp.RuntimeBinder.RuntimeBinder.Bind(DynamicMetaObjectBinder payload, IEnumerable1 parameters, DynamicMetaObject[] args, DynamicMetaObject& deferredBinding) 在 Microsoft.CSharp.RuntimeBinder.BinderHelper.Bind(DynamicMetaObjectBinder action, RuntimeBinder binder, IEnumerable
1 args, IEnumerable1 arginfos, DynamicMetaObject onBindingError) 在 Microsoft.CSharp.RuntimeBinder.CSharpInvokeMemberBinder.FallbackInvokeMember(DynamicMetaObject target, DynamicMetaObject[] args, DynamicMetaObject errorSuggestion) 在 System.Dynamic.DynamicMetaObject.BindInvokeMember(InvokeMemberBinder binder, DynamicMetaObject[] args) 在 System.Dynamic.InvokeMemberBinder.Bind(DynamicMetaObject target, DynamicMetaObject[] args) 在 System.Dynamic.DynamicMetaObjectBinder.Bind(Object[] args, ReadOnlyCollection
1 parameters, LabelTarget returnLabel)
在 System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite1 site, Object[] args) 在 System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1) 在 CallSite.Target(Closure , CallSite , ConfigurationRegistrar , Object ) 在 DataBase.Oracle.DatabaseContext.OnModelCreating(DbModelBuilder modelBuilder) 位置 DataBase.EF.Oracle\DatabaseContext.cs:行号 58 在 System.Data.Entity.Internal.LazyInternalContext.CreateModelBuilder() 在 System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext) 在 System.Data.Entity.Internal.RetryLazy
2.GetValue(TInput input)
在 System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
在 System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)
在 System.Data.Entity.Internal.Linq.InternalSet1.Initialize() 在 System.Data.Entity.Internal.Linq.InternalSet
1.get_InternalContext()
在 System.Data.Entity.Internal.Linq.InternalSet1.Find(Object[] keyValues) 在 System.Data.Entity.DbSet
1.Find(Object[] keyValues)
在 DataBase.Oracle.Database.FindEntity[T](Object keyValue) 位置 Db\Learun.DataBase.EF.Oracle\Database.cs:行号 350
在 DataBase.Repository.Repository.FindEntity[T](Object keyValue) 位置 Db\DataBase.Repository\Repository.cs:行号 300
EF6 OnModelCreating 加载数据库上下文报错
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- threenewbee 2023-07-14 12:11关注
把你的 OnModelCreating 相关代码贴一下
你是 ModelFirst 么?应该是模型定义有问题。解决 无用评论 打赏 举报
悬赏问题
- ¥15 R语言Rstudio突然无法启动
- ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
- ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
- ¥15 用windows做服务的同志有吗
- ¥60 求一个简单的网页(标签-安全|关键词-上传)
- ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
- ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
- ¥100 为什么这个恒流源电路不能恒流?
- ¥15 有偿求跨组件数据流路径图
- ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值