Click here to Skip to main content
15,892,575 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how we will take a value for IQuerable<> return type function
Posted
Comments
pree_kh 31-Aug-12 0:54am    
public IQueryable<s_employee> GetEmplyees()
{
// Select * from S_Employee
return tr.S_Employee;
}
i have made this function ,now i call this function in other class,now i have to display this list in grid,,can some one help?
Sarrrva 31-Aug-12 0:57am    
read this one
http://stackoverflow.com/questions/849009/how-can-i-return-a-iqueryable-in-c-sharp-3-0-without-knowing-its-type
Sergey Alexandrovich Kryukov 19-Sep-12 20:12pm    
What is "return type function"?
--SA

1 solution

for Example paging:

C#
public static IQueryable<TSource> Page<TSource>(this IQueryable<TSource> source,
int currentPage, int pageSize)
{
    return source.Skip((currentPage - 1) * pageSize).Take(pageSize);
}


regards
sarva
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900