为了账号安全,请及时绑定邮箱和手机立即绑定

.net 4.5 访问数据库有时会错,大部分情况正常,但有时会报这个错,

.net 4.5 访问数据库有时会错,大部分情况正常,但有时会报这个错,

LEATH 2018-08-18 09:10:57
The context cannot be used while the model is being created. This exception may be thrown if the context is used inside the OnModelCreating method or if the same context instance is accessed by multiple threads concurrently. Note that instance members of DbContext and related classes are not guaranteed to be thread safe..net 4.5 访问数据库有时会错,大部分情况正常,但有时会报这个错,
查看完整描述

1 回答

?
幕布斯7119047

TA贡献1794条经验 获得超8个赞

DbContext 实例生命周期的问题


查看完整回答
反对 回复 2018-09-13
  • 1 回答
  • 0 关注
  • 571 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信