【问题标题】:BulkInsert error using Entity Framework Extensions使用实体框架扩展的 BulkInsert 错误
【发布时间】:2022-08-03 16:31:39
【问题描述】:

在将 BulkInsert 与实体框架扩展一起使用时,我试图找到问题的根源,但没有运气。

错误信息如下:

Some EntitySet has not been mapped: 13
 at (DbModel, SchemaMapping, Schema, Schema)
 at Z.EntityFramework.Extenstions.Core.Infrastructure.DbModel.get()

有没有人遇到过这样的错误信息?

标签: c# entity-framework entity-framework-extensions


【解决方案1】:
  1. 检查实体中的“虚拟”标签。
  2. 检查您的映射代码。
  3. 如果您使用 Guid 作为您的 id,请确保 guid 数据正确。
  4. 比较您的实体和数据库表。

【讨论】:

  • 虚拟标签的示例 = public virtual People People { get;放; } 或公共虚拟 ICollection<ServiceReciept> AgcServiceReciepts { get;放; }(添加 AgcServiceReciepts = new HashSet<ServiceReciept>(); 在你的ctor)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多