public interface IRepo<out T>
{
Task<IEnumerable<T>> DbFetch();
}
I want the method to be a task because DbFetch() will be slow.
error: Invalid variance: the type parameter 'T' must be invariantly valid on 'IRepo.DbFetch()'. 'T' is covariant.
I understand the reasoning for the error but how to get around it so I could await on that method.
Note: cannot remove out T
because of design requirement elsewhere.