LocalGovIMS_localgov-ims/src/BusinessLogic/Interfaces/Repositories/IRepository.cs
using System;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace BusinessLogic.Interfaces.Repositories
{
    public interface IRepository<TEntity> where TEntity : class
    {
        IEnumerable<Expression<Func<TEntity, bool>>> Filters { get; }
        void AddFilter(Expression<Func<TEntity, bool>> filter);
        IEnumerable<TEntity> GetAll();
        IEnumerable<TEntity> Find(Expression<Func<TEntity, bool>> predicate);
        TEntity SingleOrDefault(Expression<Func<TEntity, bool>> predicate);
        void Add(TEntity entity);
        void AddRange(IEnumerable<TEntity> entities);
        void Remove(TEntity entity);
        void RemoveRange(IEnumerable<TEntity> entities);
        void BulkInsert(IEnumerable<TEntity> entities);
        void BulkUpdate(IEnumerable<TEntity> entities);
        void BulkUpdate(IEnumerable<TEntity> entities, IEnumerable<string> fieldExclusions);
        IEnumerable<TEntity> BulkSelectNotExisting(IEnumerable<TEntity> entities);
    }
}