i found a code which seems work. just tell me how use the below code to return paged customer...may be 20 customer. also tell me how to enable sorting.
give me a small sample code which fetch customer with paging and sorting. thanks
publicinterfaceIPaged<T>:IEnumerable<T>{///<summary>/// Get the total entity count.///</summary>intCount{ get;}///<summary>/// Get a range of persited entities.///</summary>IEnumerable<T>GetRange(int index,int count);}publicclassPaged<T>:IPaged<T>{privatereadonlyIQueryable<T> source;publicPaged(IQueryable<T> source){this.source = source;}publicIEnumerator<T>GetEnumerator(){return source.GetEnumerator();}IEnumeratorIEnumerable.GetEnumerator(){returnGetEnumerator();}publicintCount{
get {return source.Count();}}publicIEnumerable<T>GetRange(int index,int count){return source.Skip(index).Take(count);}}publicIPaged<Customer>GetCustomers();