Ninject: How to bind an open generic with more than one type argument?

后端 未结 1 737
天命终不由人
天命终不由人 2021-02-02 10:36

I\'m using Ninject 2.2, and I\'m trying to setup a binding for an open generic that takes two type arguments. According to this answer by qes, the correct syntax to bind I

相关标签:
1条回答
  • 2021-02-02 11:06
    Bind(typeof(IRepository<,>)).To(typeof(Repository<,>));
    

    Try that....

    0 讨论(0)
提交回复
热议问题