Refactor cancellation token parameter names
Updated parameter names from `ct` to `cancellation` in several asynchronous methods of the `IRepository<TEntity>` interface. This change improves code readability and clarity. Affected methods include `CreateAsync`, `UpdateAsync`, `DeleteAsync`, `ReadAllAsync`, `ReadOrDefaultAsync`, and their generic counterparts.
This commit is contained in:
parent
89a77019dc
commit
a7df79629d
@ -6,25 +6,25 @@ public interface IRepository<TEntity>
|
|||||||
{
|
{
|
||||||
public IEntityMapper<TEntity> Mapper { get; }
|
public IEntityMapper<TEntity> Mapper { get; }
|
||||||
|
|
||||||
public Task<TEntity> CreateAsync(TEntity entity, CancellationToken ct = default);
|
public Task<TEntity> CreateAsync(TEntity entity, CancellationToken cancellation = default);
|
||||||
|
|
||||||
public Task<IEnumerable<TEntity>> CreateAsync(IEnumerable<TEntity> entities, CancellationToken ct = default);
|
public Task<IEnumerable<TEntity>> CreateAsync(IEnumerable<TEntity> entities, CancellationToken cancellation = default);
|
||||||
|
|
||||||
public IReadQuery<TEntity> Read(Expression<Func<TEntity, bool>> expression);
|
public IReadQuery<TEntity> Read(Expression<Func<TEntity, bool>> expression);
|
||||||
|
|
||||||
public Task UpdateAsync<TDto>(TDto dto, Expression<Func<TEntity, bool>> expression, CancellationToken ct = default);
|
public Task UpdateAsync<TDto>(TDto dto, Expression<Func<TEntity, bool>> expression, CancellationToken cancellation = default);
|
||||||
|
|
||||||
public Task DeleteAsync(Expression<Func<TEntity, bool>> expression, CancellationToken ct = default);
|
public Task DeleteAsync(Expression<Func<TEntity, bool>> expression, CancellationToken cancellation = default);
|
||||||
|
|
||||||
[Obsolete("Use Read-method returning IReadQuery<TEntity> instead.")]
|
[Obsolete("Use Read-method returning IReadQuery<TEntity> instead.")]
|
||||||
public Task<IEnumerable<TEntity>> ReadAllAsync(Expression<Func<TEntity, bool>>? expression = null, CancellationToken ct = default);
|
public Task<IEnumerable<TEntity>> ReadAllAsync(Expression<Func<TEntity, bool>>? expression = null, CancellationToken cancellation = default);
|
||||||
|
|
||||||
[Obsolete("Use Read-method returning IReadQuery<TEntity> instead.")]
|
[Obsolete("Use Read-method returning IReadQuery<TEntity> instead.")]
|
||||||
public Task<TEntity?> ReadOrDefaultAsync(Expression<Func<TEntity, bool>> expression, bool single = true, CancellationToken ct = default);
|
public Task<TEntity?> ReadOrDefaultAsync(Expression<Func<TEntity, bool>> expression, bool single = true, CancellationToken cancellation = default);
|
||||||
|
|
||||||
[Obsolete("Use Read-method returning IReadQuery<TEntity> instead.")]
|
[Obsolete("Use Read-method returning IReadQuery<TEntity> instead.")]
|
||||||
public Task<IEnumerable<TDto>> ReadAllAsync<TDto>(Expression<Func<TEntity, bool>>? expression = null, CancellationToken ct = default);
|
public Task<IEnumerable<TDto>> ReadAllAsync<TDto>(Expression<Func<TEntity, bool>>? expression = null, CancellationToken cancellation = default);
|
||||||
|
|
||||||
[Obsolete("Use Read-method returning IReadQuery<TEntity> instead.")]
|
[Obsolete("Use Read-method returning IReadQuery<TEntity> instead.")]
|
||||||
public Task<TDto?> ReadOrDefaultAsync<TDto>(Expression<Func<TEntity, bool>> expression, bool single = true, CancellationToken ct = default);
|
public Task<TDto?> ReadOrDefaultAsync<TDto>(Expression<Func<TEntity, bool>> expression, bool single = true, CancellationToken cancellation = default);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user