Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear all

i have problen i don't know use function MAX on enitiy my stop here What can do it now ?
train=new trianenitiys();
IEnumerable<Istudent> q=null;
q = train.Istudents.Max();

thanks
Posted
Comments
Herman<T>.Instance 7-Feb-12 7:00am    
isn't there a lenght or count property?

1 solution

train=new trianenitiys();
IEnumerable<Istudent> q=null;
q = train.Istudents.Max(EMPnum);
 
Share this answer
 
Comments
khalid_rf 7-Feb-12 7:22am    
dear all,

i found solution

int ff;
IEnumerable<istudent> q=null;
ff = train.Istudents.Max<istudent>(x=>x.Empnum);
q = train.Istudents.Where(x => x.Empnum == ff);

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