Refactor IRepository to simplify CreateAsync methods
Updated IRepository<TEntity> to remove generic type parameters from CreateAsync methods, now directly accepting TEntity. Corresponding changes made in DbRepository to align method signatures. Implementations still throw NotImplementedException.
This commit is contained in:
parent
1b793e2b75
commit
352b59dfdf
@ -4,9 +4,9 @@ namespace DigitalData.Core.Abstractions.Infrastructure;
|
||||
|
||||
public interface IRepository<TEntity>
|
||||
{
|
||||
public Task<TEntity> CreateAsync<TDto>(TDto dto, CancellationToken ct = default);
|
||||
public Task<TEntity> CreateAsync(TEntity dto, CancellationToken ct = default);
|
||||
|
||||
public Task<TEntity> CreateAsync<TDto>(IEnumerable<TDto> dtos, CancellationToken ct = default);
|
||||
public Task<TEntity> CreateAsync(IEnumerable<TEntity> dtos, CancellationToken ct = default);
|
||||
|
||||
public Task<IEnumerable<TEntity>> ReadAsync(Expression? expression = null, CancellationToken ct = default);
|
||||
|
||||
|
||||
@ -16,12 +16,12 @@ public class DbRepository<TDbContext, TEntity> : IRepository<TEntity> where TDbC
|
||||
Entities = queryFactory(context);
|
||||
}
|
||||
|
||||
public Task<TEntity> CreateAsync<TDto>(TDto dto, CancellationToken ct = default)
|
||||
public Task<TEntity> CreateAsync(TEntity dto, CancellationToken ct = default)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<TEntity> CreateAsync<TDto>(IEnumerable<TDto> dtos, CancellationToken ct = default)
|
||||
public Task<TEntity> CreateAsync(IEnumerable<TEntity> dtos, CancellationToken ct = default)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user