我有此类型约束
where TLookup : ILookupable<ILookup>
并且我正在为此类型传递此接口
public interface IEmployeeProxy : ILookupableCode
您在哪里
public interface ILookupableCode : ILookupable<ILookupCode>
和
public interface ILookupable<T> where T : ILookup
{
Task<IEnumerable<T>> LookupByNameAsync(string name, int take = 5, int skip = 0);
Task<T> LookupByIdAsync(long id);
}
和
public interface ILookupCode : ILookup
但是我遇到了There is no implicit reference conversion
错误,我不知道为什么,因为对我来说IEmployeeProxy
是
IEmployeeProxy
=>ILookupableCode
=>ILookupable<ILookupCode>
=> ILookupable<ILookup>
我在这里做错了什么?为什么我收到此错误?对我来说,我应该工作。
[如果您想知道为什么要这样做,是因为我想让ILookupable
带有一些返回ILookup
的方法,但也希望ILookupableCode
带有与ILookupable
相同的方法,这些方法将返回[ C0]和其他一些内容。
Task<T>
。