21 lines
745 B
C#
21 lines
745 B
C#
using System.Linq.Expressions;
|
|
|
|
namespace DigitalData.Core.Abstraction.Application.Repository;
|
|
|
|
public interface IRepository<TEntity>
|
|
{
|
|
public IEntityMapper<TEntity> Mapper { get; }
|
|
|
|
public Task<TEntity> CreateAsync(TEntity entity, CancellationToken cancellation = default);
|
|
|
|
public Task<IEnumerable<TEntity>> CreateAsync(IEnumerable<TEntity> entities, CancellationToken cancellation = default);
|
|
|
|
public IQueryable<TEntity> Read();
|
|
|
|
public IQueryable<TEntity> ReadOnly();
|
|
|
|
public Task UpdateAsync<TDto>(TDto dto, Expression<Func<TEntity, bool>> expression, CancellationToken cancellation = default);
|
|
|
|
public Task DeleteAsync(Expression<Func<TEntity, bool>> expression, CancellationToken cancellation = default);
|
|
}
|