Solving “The ObjectContext instance has been disposed and can no longer be used for operations that require a connection” InvalidOperationException

前端 未结 7 2120
再見小時候
再見小時候 2020-11-22 06:38

I am trying to populate a GridView using Entity Frameworkm but every time I am getting the following error:

\"Property accessor \'LoanPro

7条回答
  •  再見小時候
    2020-11-22 07:07

    It's a very late answer but I resolved the issue turning off the lazy loading:

    db.Configuration.LazyLoadingEnabled = false;
    

提交回复
热议问题