I have this type constraint
where TLookup : ILookupable<ILookup>
And I'm passing this interface for the type
public interface IEmployeeProxy : ILookupableCode
Where you have
public interface ILookupableCode : ILookupable<ILookupCode>
And
public interface ILookupable<T> where T : ILookup
{
Task<IEnumerable<T>> LookupByNameAsync(string name, int take = 5, int skip = 0);
Task<T> LookupByIdAsync(long id);
}
And
public interface ILookupCode : ILookup
But I'm getting the There is no implicit reference conversion
error and I don't know why, because for me IEmployeeProxy
is
IEmployeeProxy
=> ILookupableCode
=> ILookupable<ILookupCode>
=> ILookupable<ILookup>
What I'm doing wrong here? Why I'm getting this error? For me looks like I should work.
If you want to know why I'm doing this, is because I want to have ILookupable
with some methods that return ILookup
, but also have ILookupableCode
with the same methods of ILookupable
that will return ILookupCode
and a few more things too.