【发布时间】:2018-05-02 17:49:19
【问题描述】:
用 3 个参数注册 Generic 类的方法是什么
public interface ITest<T,V,VE>
{
}
public class TestRespository<T,V,VE>:ITest<T,V,VE>
{
}
我是这样注册的
services.AddScoped(typeof(ITest<,,>), typeof(ITest<,,>));
但无法进入构造函数以及
service.GetService(typeof(ITest<TestClass, vTestClass, VETestClass>)) as ITest<TestClass, vTestClass, VETestClass>;
【问题讨论】:
标签: c# asp.net-mvc asp.net-core unity-container