Created
October 11, 2019 09:48
-
-
Save Rudyzio/18435c78fa57ad3270f04b3957f5c71d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IRepository<TEntity> where TEntity : class | |
{ | |
TEntity FindById(int id); | |
IEnumerable<TEntity> Find(ISpecification<TEntity> specification = null); | |
void Add(TEntity entity); | |
void AddRange(IEnumerable<TEntity> entities); | |
void Remove(TEntity entity); | |
void RemoveRange(IEnumerable<TEntity> entities); | |
void Update(TEntity entity); | |
bool Contains(ISpecification<TEntity> specification = null); | |
bool Contains(Expression<Func<TEntity, bool>> predicate); | |
int Count(ISpecification<TEntity> specification = null); | |
int Count(Expression<Func<TEntity, bool>> predicate); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment