예제 #1
0
        public async Task <PaginatedList <EquipmentViewModel> > FindAsync(string searchQuery = DefaultSearchQuery, int page = DefaultPage, int rpp = DefaultRpp, string sortBy = DefaultSortBy, bool sortAsc = DefaultSortAsc)
        {
            IEquipmentFilter filter = Filter.CreateEquipmentFilter();

            filter.SearchQuery    = searchQuery;
            filter.Page           = page;
            filter.RecordsPerPage = rpp;
            filter.SortBy         = sortBy;
            filter.SortAscending  = sortAsc;
            return(mapper.Map <PaginatedList <EquipmentViewModel> >(await Service.FindAsync(mapper.Map <IEquipmentFilter>(filter))));
        }
 public Task <PaginatedList <IEquipment> > FindAsync(IEquipmentFilter filter)
 {
     return(EquipmentRepository.FindAsync(filter));
 }