Last active
August 29, 2015 14:21
-
-
Save caferrari/56212ef8b5324b55a8bc to your computer and use it in GitHub Desktop.
BaseRepository interface
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq.Expressions; | |
| using System.Threading.Tasks; | |
| using PixelAzul.CrossCutting.Pagination; | |
| namespace PixelAzul.Domain.Interfaces.Repositories | |
| { | |
| public interface IBaseRepository<TEntity, TKey> | |
| where TEntity: Entity | |
| where TKey : IComparable | |
| { | |
| Task<TEntity> Find(TKey id); | |
| Task<List<U>> SelectBy<U>(Expression<Func<TEntity, bool>> exp, Expression<Func<TEntity, U>> columns); | |
| Task<List<TEntity>> SelectBy(Expression<Func<TEntity, bool>> exp); | |
| Task<List<U>> Select<U>(Expression<Func<TEntity, U>> columns); | |
| Task<PagedResult<U>> SelectPagedBy<U>(PaginationSettings settings, Expression<Func<TEntity, bool>> exp, Expression<Func<TEntity, U>> columns); | |
| Task<PagedResult<TEntity>> SelectPagedBy(PaginationSettings settings, Expression<Func<TEntity, bool>> exp); | |
| Task<PagedResult<U>> SelectPaged<U>(PaginationSettings settings, Expression<Func<TEntity, U>> columns); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment