我有这个界面:
public interface IDataManageService<T>
where T : class
{
//some methods
}
和这个具体的类:
public class DataService<Tdto, Tdata> : IDataManageService<Tdto>
where Tdto : class
where Tdata : class
{
//this class have constructor with argument,
//but create via factory method
}
此工厂方法创建实例:
public static IDataManageService<T> CreateDataService<T>()
where T : class
{
//something
//returning instance of DataService class
}
然后,我使用Ninject尝试将IDataManageService <>绑定到工厂方法CreateDataService <>()。我该怎么办?