Refactor DbRepository methods for clarity and extensibility
Updated methods in the `DbRepository` class to be virtual, allowing for overriding in derived classes. Renamed parameters from `dto` to `entity` and `dtos` to `entities` for improved clarity. All methods still throw `NotImplementedException` as implementations are pending.
This commit is contained in:
parent
a7e4291e42
commit
4c55ecb427
@ -20,27 +20,27 @@ public class DbRepository<TDbContext, TEntity> : IRepository<TEntity> where TDbC
|
|||||||
Mapper = mapper;
|
Mapper = mapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<TEntity> CreateAsync(TEntity dto, CancellationToken ct = default)
|
public virtual Task<TEntity> CreateAsync(TEntity entity, CancellationToken ct = default)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<TEntity> CreateAsync(IEnumerable<TEntity> dtos, CancellationToken ct = default)
|
public virtual Task<TEntity> CreateAsync(IEnumerable<TEntity> entities, CancellationToken ct = default)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<IEnumerable<TEntity>> DeleteAsync<TDto>(Expression expression, CancellationToken ct = default)
|
public virtual Task<IEnumerable<TEntity>> DeleteAsync<TDto>(Expression expression, CancellationToken ct = default)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<IEnumerable<TEntity>> ReadAsync(Expression? expression = null, CancellationToken ct = default)
|
public virtual Task<IEnumerable<TEntity>> ReadAsync(Expression? expression = null, CancellationToken ct = default)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<IEnumerable<TEntity>> UpdateAsync<TDto>(TDto dto, Expression expression, CancellationToken ct = default)
|
public virtual Task<IEnumerable<TEntity>> UpdateAsync<TDto>(TDto dto, Expression expression, CancellationToken ct = default)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user