第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

.net core異常:"Cannot access a disposed object"

.net core異常:"Cannot access a disposed object"

陪伴而非守候 2018-07-31 07:10:30
在一個asp.net core webapi項目的集成測試中遭遇下面的異常,請問如何解決?Cannot access a disposed object. A common cause of this error is disposing a context that was resolved from dependency injection and then later trying to use the same context instance elsewhere in your application. This may occur if you are calling Dispose() on the context, or wrapping the context in a using statement. If you are using dependency injection, you should let the dependency injection container take care of disposing context instances. [xUnit.net 00:00:03.2384249]       Object name: 'EfUnitOfWork'. [xUnit.net 00:00:03.2425838]       Stack Trace:依賴注入用的是 services.AddScoped
查看完整描述

1 回答

?
阿波羅的戰(zhàn)車

TA貢獻1862條經(jīng)驗 獲得超6個贊

翻轉(zhuǎn)控制器已經(jīng)釋放了目標對象了,參考修改對象生命周期的方法


查看完整回答
反對 回復 2018-08-25
  • 1 回答
  • 0 關(guān)注
  • 3753 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號