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.
17 lines
664 B
C#
17 lines
664 B
C#
using System.Linq.Expressions;
|
|
|
|
namespace DigitalData.Core.Abstractions.Infrastructure;
|
|
|
|
public interface IRepository<TEntity>
|
|
{
|
|
public Task<TEntity> CreateAsync(TEntity dto, CancellationToken ct = default);
|
|
|
|
public Task<TEntity> CreateAsync(IEnumerable<TEntity> dtos, CancellationToken ct = default);
|
|
|
|
public Task<IEnumerable<TEntity>> ReadAsync(Expression? expression = null, CancellationToken ct = default);
|
|
|
|
public Task<IEnumerable<TEntity>> UpdateAsync<TDto>(TDto dto, Expression expression, CancellationToken ct = default);
|
|
|
|
public Task<IEnumerable<TEntity>> DeleteAsync<TDto>(Expression expression, CancellationToken ct = default);
|
|
}
|