Design patterns Repository Pattern


About the implementation of IEnumerable<TEntity> Get(Expression<Func<TEntity, bool>> filter): The idea of this is to use Expressions like i => == 17 to write generic requests. It is a way to query data without using the specific query language of your technology. The implementation is rather extensive, therefore you might want to consider other alternatives, like specific methods on your implemented repositories: An imaginary CompanyRepository could provide the method GetByName(string name).