public static T[] Paginate <T, TKey>( this ICrudService <T, TKey> service, int perPage, int pageNo ) where T : class, IEntity <TKey> { return(Queryable.Skip <T>(service .All(), perPage * pageNo) .Take(perPage) .ToArray()); }
public virtual ActionResult Index() { var dto = _service.All(); return(View("Index", Mapper.Map <IEnumerable <TViewModel> >(dto))); }