TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ankit Shukla
NA
681
116.7k
Add where clause in LINQ query
Feb 25 2020 2:51 AM
Hello,
Requirement: Need to get max SESSION_SRNO for particular LoginID
I have a method like this:
public long Get_Session_SrNo_Count(string userID)
{
HRMSContext Entities = this.HRMSRepository.Context as HRMSContext;
return Entities.t_login_info.ToList().Max(p => (long?)p.SESSION_SRNO).GetValueOrDefault();
}
I need to add where clause in this query.
Ex: where p.LoginID == userID
Please Help.
Thanks in advance.
Reply
Answers (
2
)
Add XElement to another XElement in specific location
How to find out 2nd or nth highest salary?