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:
Developer 02
2025-04-16 09:38:07 +02:00
parent 1b793e2b75
commit 352b59dfdf
2 changed files with 4 additions and 4 deletions

View File

@@ -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);