ISupportsExplicitLoading.cs 816 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq.Expressions;
  4. using System.Threading;
  5. using System.Threading.Tasks;
  6. using Abp.Domain.Entities;
  7. namespace Abp.Domain.Repositories
  8. {
  9. public interface ISupportsExplicitLoading<TEntity, TPrimaryKey>
  10. where TEntity : class, IEntity<TPrimaryKey>
  11. {
  12. Task EnsureCollectionLoadedAsync<TProperty>(
  13. TEntity entity,
  14. Expression<Func<TEntity, IEnumerable<TProperty>>> collectionExpression,
  15. CancellationToken cancellationToken)
  16. where TProperty : class;
  17. Task EnsurePropertyLoadedAsync<TProperty>(
  18. TEntity entity,
  19. Expression<Func<TEntity, TProperty>> propertyExpression,
  20. CancellationToken cancellationToken)
  21. where TProperty : class;
  22. }
  23. }