Why am I getting the error “Cannot instantiate implementation type” for my generic service?

前端 未结 4 2005
挽巷
挽巷 2021-02-12 09:12

I have a generic repository that I have been instantiating right in my WEB API Controller no problem for a while.

This is what my controller used to look like:



        
4条回答
  •  -上瘾入骨i
    2021-02-12 09:51

    This happened to me recently. I had the implementation class marked "abstract", an artifact of an earlier design. I removed it and the container was able to instantiate the class without a problem.

提交回复
热议问题