17 lines
665 B
C#
17 lines
665 B
C#
using System.Linq.Expressions;
|
|
|
|
namespace Marco.Pms.DataAccess.Repository.IRepository
|
|
{
|
|
public interface IRepository<T> where T : class
|
|
{
|
|
// T - Category
|
|
IEnumerable<T> GetAll(Expression<Func<T, bool>>? filter, string? includeProperties = null);
|
|
//T GetFirstOrDefault();
|
|
T Get(Expression<Func<T, bool>> filter, string? includeProperties = null, bool tracked = false);
|
|
Task<T> GetAsync(Expression<Func<T, bool>> filter, bool tracked = false, params Expression<Func<T, object>>[] includeProperties);
|
|
void Add(T entity);
|
|
void Remove(T entity);
|
|
void RemoveRange(IEnumerable<T> entity);
|
|
}
|
|
}
|