Primera subida
This commit is contained in:
26
back/Application/Contracts/Persistence/IAsyncRepository.cs
Normal file
26
back/Application/Contracts/Persistence/IAsyncRepository.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using back.Entities;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace back.Application.Contracts.Persistence
|
||||
{
|
||||
public interface IAsyncRepository<T> where T : BaseEntity
|
||||
{
|
||||
Task<IReadOnlyList<T>> GetAllAsync();
|
||||
Task<IReadOnlyList<T>> GetAsync(Expression<Func<T, bool>>? predicate);
|
||||
Task<IReadOnlyList<T>> GetAsync(Expression<Func<T, bool>>? predicate = null,
|
||||
Func<IQueryable<T>, IOrderedQueryable<T>>? orderBy = null,
|
||||
string? includeString = null,
|
||||
bool disableTracking = true);
|
||||
Task<IReadOnlyList<T>> GetAsync(Expression<Func<T, bool>>? predicate = null,
|
||||
Func<IQueryable<T>, IOrderedQueryable<T>>? orderBy = null,
|
||||
List<Expression<Func<T, object>>>? includes = null,
|
||||
bool disableTracking = true);
|
||||
Task<T> GetByIdAsync(int id);
|
||||
|
||||
Task<T> AddAsync(T entity);
|
||||
Task<T> UpdateAsync(T entity);
|
||||
Task DeleteAsync(T entity);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user