Wrapper that accepts both scalar and collection
I guess you could use inheritance if you really need that extra property:

public class ResourceCollection&lt;TEntity&gt; : Resource&lt;ICollection&lt;TEntity&gt;&gt;
{
    public ResourceCollection(ICollection&lt;TEntity&gt; data) : base(data)
    {
        //modify metadata if needed
    }

    public int Count =&gt; Data.Count;
}


While technically this is still two classes, you can now cast your collections to Resource&lt;T&gt; and process them in generic manner with your other resources.