问题:
The entity type LogEntity is not part of the model for the current context.
原因分析:
碰见这个错误是由于
1.在Entity Framework中访问数据中不存在的实体模型(问题根源)
2.检查实体类每个字段是否统一
3.检查代码执行Insert时是否存在逻辑错误
4.检查引用版本(版本不统一有可能会导致奇怪错误)
解决方法
一定检查仔细,保证2.3.4条没问题之后再配置映射关系:
问题解决
End