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

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