I have noticed that there is a "generic" method to load a "reference" property but not a "collection" property in the repository code.
I don t understand why there is a distinction and so no generic method for a collection property ?
Actual code for reference property
public virtual async Task LoadPropertyAsync(TEntity item, Expression<Func<TEntity, object>> property, CancellationToken cancellationToken = default)
=> await Context.Entry(item).Reference(property).LoadAsync(cancellationToken);
A proposition for collection property
public virtual async Task LoadCollectionAsync(TEntity item, Expression<Func<TEntity, IEnumerable<object>>> property, CancellationToken cancellationToken = default)
=> await Context.Entry<TEntity>(item).Collection(property).LoadAsync(cancellationToken);