private static ItemsList <Boat> InitBoats() { var boats = context.GetEntities <Boat>(); var pager = new DefaultPager(3, boats.Count()); //var boatsList = new ItemsList<Boat>(boats, filters, boatsSorters); var boatsList = new ItemsList <Boat>(boats, pager); var filters = new List <IFilter <Boat> >() { new CabinsFilter(5), new HullTypeFilter(HullType.Mono) }; var boatsSorters = new List <ISortModifier <Boat> >() { new SortByCabinsNum() }; return(boatsList); }
private static ItemsList <Skipper> InitSkippers() { var skippers = context.GetEntities <Skipper>(); var pager = new DefaultPager(4, skippers.Count()); var skippersSorters = new List <ISortModifier <Skipper> >() { new SortByExperience() { Asc = true }, new SortByPrice() { Asc = false } }; var skipperList = new ItemsList <Skipper>(skippers, pager, null, skippersSorters); return(skipperList); }