public async Task <PaginatedList <PlanViewModel> > FindAsync(string searchQuery = DefaultSearchQuery, int page = DefaultPage, int rpp = DefaultRpp, string sortBy = DefaultSortBy, bool sortAsc = DefaultSortAsc) { IPlanFilter filter = Filter.CreatePlanFilter(); filter.SearchQuery = searchQuery; filter.Page = page; filter.RecordsPerPage = rpp; filter.SortBy = sortBy; filter.SortAscending = sortAsc; return(mapper.Map <PaginatedList <PlanViewModel> >(await Service.FindAsync(mapper.Map <IPlanFilter>(filter)))); }
public Task <PaginatedList <IPlan> > FindAsync(IPlanFilter filter) { return(PlanRepository.FindAsync(filter)); }