Class RepositoryExtensions
Inheritance
object
RepositoryExtensions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Assembly: Volo.Abp.Ddd.Domain.dll
Syntax
public static class RepositoryExtensions
Methods
EnsureCollectionLoadedAsync<TEntity, TKey, TProperty>(IBasicRepository<TEntity, TKey>, TEntity, Expression<Func<TEntity, IEnumerable<TProperty>>>, CancellationToken)
Declaration
public static Task EnsureCollectionLoadedAsync<TEntity, TKey, TProperty>(this IBasicRepository<TEntity, TKey> repository, TEntity entity, Expression<Func<TEntity, IEnumerable<TProperty>>> propertyExpression, CancellationToken cancellationToken = default) where TEntity : class, IEntity<TKey> where TProperty : class
Parameters
| Type |
Name |
Description |
| IBasicRepository<TEntity, TKey> |
repository |
|
| TEntity |
entity |
|
| System.Linq.Expressions.Expression<TDelegate><System.Func<T, TResult><TEntity, System.Collections.Generic.IEnumerable<T><TProperty>>> |
propertyExpression |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Type Parameters
| Name |
Description |
| TEntity |
|
| TKey |
|
| TProperty |
|
EnsureExistsAsync<TEntity, TKey>(IRepository<TEntity, TKey>, TKey, CancellationToken)
Declaration
public static Task EnsureExistsAsync<TEntity, TKey>(this IRepository<TEntity, TKey> repository, TKey id, CancellationToken cancellationToken = default) where TEntity : class, IEntity<TKey>
Parameters
| Type |
Name |
Description |
| IRepository<TEntity, TKey> |
repository |
|
| TKey |
id |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Type Parameters
| Name |
Description |
| TEntity |
|
| TKey |
|
EnsureExistsAsync<TEntity, TKey>(IRepository<TEntity, TKey>, Expression<Func<TEntity, bool>>, CancellationToken)
Declaration
public static Task EnsureExistsAsync<TEntity, TKey>(this IRepository<TEntity, TKey> repository, Expression<Func<TEntity, bool>> expression, CancellationToken cancellationToken = default) where TEntity : class, IEntity<TKey>
Parameters
| Type |
Name |
Description |
| IRepository<TEntity, TKey> |
repository |
|
| System.Linq.Expressions.Expression<TDelegate><System.Func<T, TResult><TEntity, bool>> |
expression |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Type Parameters
| Name |
Description |
| TEntity |
|
| TKey |
|
EnsurePropertyLoadedAsync<TEntity, TKey, TProperty>(IBasicRepository<TEntity, TKey>, TEntity, Expression<Func<TEntity, TProperty>>, CancellationToken)
Declaration
public static Task EnsurePropertyLoadedAsync<TEntity, TKey, TProperty>(this IBasicRepository<TEntity, TKey> repository, TEntity entity, Expression<Func<TEntity, TProperty>> propertyExpression, CancellationToken cancellationToken = default) where TEntity : class, IEntity<TKey> where TProperty : class
Parameters
| Type |
Name |
Description |
| IBasicRepository<TEntity, TKey> |
repository |
|
| TEntity |
entity |
|
| System.Linq.Expressions.Expression<TDelegate><System.Func<T, TResult><TEntity, TProperty>> |
propertyExpression |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Type Parameters
| Name |
Description |
| TEntity |
|
| TKey |
|
| TProperty |
|
HardDeleteAsync<TEntity>(IBasicRepository<TEntity>, TEntity, bool, CancellationToken)
Declaration
public static Task HardDeleteAsync<TEntity>(this IBasicRepository<TEntity> repository, TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default) where TEntity : class, IEntity, ISoftDelete
Parameters
| Type |
Name |
Description |
| IBasicRepository<TEntity> |
repository |
|
| TEntity |
entity |
|
| bool |
autoSave |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Type Parameters
HardDeleteAsync<TEntity>(IBasicRepository<TEntity>, IEnumerable<TEntity>, bool, CancellationToken)
Declaration
public static Task HardDeleteAsync<TEntity>(this IBasicRepository<TEntity> repository, IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default) where TEntity : class, IEntity, ISoftDelete
Parameters
| Type |
Name |
Description |
| IBasicRepository<TEntity> |
repository |
|
| System.Collections.Generic.IEnumerable<T><TEntity> |
entities |
|
| bool |
autoSave |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Type Parameters
HardDeleteAsync<TEntity>(IRepository<TEntity>, Expression<Func<TEntity, bool>>, bool, CancellationToken)
Declaration
public static Task HardDeleteAsync<TEntity>(this IRepository<TEntity> repository, Expression<Func<TEntity, bool>> predicate, bool autoSave = false, CancellationToken cancellationToken = default) where TEntity : class, IEntity, ISoftDelete
Parameters
| Type |
Name |
Description |
| IRepository<TEntity> |
repository |
|
| System.Linq.Expressions.Expression<TDelegate><System.Func<T, TResult><TEntity, bool>> |
predicate |
|
| bool |
autoSave |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Type Parameters