The current type is an interface and cannot be constructed. Are you missing a type mapping?

錯誤:
The current type is an interface and cannot be constructed. Are you missing a type mapping?
原因:
在使用DI(dependency injection)依賴注入的時候,忘記註冊了。
解決:
註冊一下接口和方法
container.RegisterType

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章