|
|
@ -20,8 +20,10 @@ namespace Volo.Abp.Domain.Repositories |
|
|
{ |
|
|
{ |
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Get a single entity by the given <paramref name="predicate"/>.
|
|
|
/// Get a single entity by the given <paramref name="predicate"/>.
|
|
|
/// It returns null if no entity with the given <paramref name="predicate"/>.
|
|
|
/// <para>
|
|
|
|
|
|
/// It returns null if there is no entity with the given <paramref name="predicate"/>.
|
|
|
/// It throws <see cref="InvalidOperationException"/> if there are multiple entities with the given <paramref name="predicate"/>.
|
|
|
/// It throws <see cref="InvalidOperationException"/> if there are multiple entities with the given <paramref name="predicate"/>.
|
|
|
|
|
|
/// </para>
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
/// <param name="predicate">A condition to find the entity</param>
|
|
|
/// <param name="predicate">A condition to find the entity</param>
|
|
|
/// <param name="includeDetails">Set true to include all children of this entity</param>
|
|
|
/// <param name="includeDetails">Set true to include all children of this entity</param>
|
|
|
@ -34,8 +36,10 @@ namespace Volo.Abp.Domain.Repositories |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Get a single entity by the given <paramref name="predicate"/>.
|
|
|
/// Get a single entity by the given <paramref name="predicate"/>.
|
|
|
|
|
|
/// <para>
|
|
|
/// It throws <see cref="EntityNotFoundException"/> if there is no entity with the given <paramref name="predicate"/>.
|
|
|
/// It throws <see cref="EntityNotFoundException"/> if there is no entity with the given <paramref name="predicate"/>.
|
|
|
/// It throws <see cref="InvalidOperationException"/> if there are multiple entities with the given <paramref name="predicate"/>.
|
|
|
/// It throws <see cref="InvalidOperationException"/> if there are multiple entities with the given <paramref name="predicate"/>.
|
|
|
|
|
|
/// </para>
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
/// <param name="predicate">A condition to filter entities</param>
|
|
|
/// <param name="predicate">A condition to filter entities</param>
|
|
|
/// <param name="includeDetails">Set true to include all children of this entity</param>
|
|
|
/// <param name="includeDetails">Set true to include all children of this entity</param>
|
|
|
@ -47,10 +51,11 @@ namespace Volo.Abp.Domain.Repositories |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Deletes many entities by function.
|
|
|
/// Deletes many entities by the given <paramref name="predicate"/>.
|
|
|
/// Notice that: All entities fits to given predicate are retrieved and deleted.
|
|
|
/// <para>
|
|
|
/// This may cause major performance problems if there are too many entities with
|
|
|
/// Please note: This may cause major performance problems if there are too many entities returned for a
|
|
|
/// given predicate.
|
|
|
/// given predicate and the database provider doesn't have a way to efficiently delete many entities.
|
|
|
|
|
|
/// </para>
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
/// <param name="predicate">A condition to filter entities</param>
|
|
|
/// <param name="predicate">A condition to filter entities</param>
|
|
|
/// <param name="autoSave">
|
|
|
/// <param name="autoSave">
|
|
|
@ -63,6 +68,14 @@ namespace Volo.Abp.Domain.Repositories |
|
|
bool autoSave = false, |
|
|
bool autoSave = false, |
|
|
CancellationToken cancellationToken = default |
|
|
CancellationToken cancellationToken = default |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc cref="DeleteAsync"/>
|
|
|
|
|
|
/// <remarks>This is an alias for <see cref="DeleteAsync"/> </remarks>
|
|
|
|
|
|
Task DeleteManyAsync( |
|
|
|
|
|
[NotNull] Expression<Func<TEntity, bool>> predicate, |
|
|
|
|
|
bool autoSave = false, |
|
|
|
|
|
CancellationToken cancellationToken = default |
|
|
|
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public interface IRepository<TEntity, TKey> : IRepository<TEntity>, IReadOnlyRepository<TEntity, TKey>, IBasicRepository<TEntity, TKey> |
|
|
public interface IRepository<TEntity, TKey> : IRepository<TEntity>, IReadOnlyRepository<TEntity, TKey>, IBasicRepository<TEntity, TKey> |
|
|
|