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
onmyway365 .
NA
39
5k
2 Simple Lambda Expression in 1?
Jan 22 2016 2:07 AM
Hi all,
I have a fairly simple question:
How can I combine 2 lambda expression in one (is it possible)?
I want to update 2 fields for the same record:
deltaList.ForEach(u => u.Processing_Result = 0);
deltaList.ForEach(u => u.Processing_Result_Text = "UNIQUE");
PLEASE NOTE:
I have tried to combine these 2 with &&, but get an error as one is int and the other string.
Also, how can I combine these 2 expressions:
var data = stageContext.ProjectMasters.Where(u => u.Processing_Result == 0);
AND
(u => u.Processing_Result_Text = "UNIQUE")
PLEASE NOTE:
It seems I can combine these 2 with && (like below) - is this correct?
var data = stageContext.ProjectMasters.Where(u => u.Processing_Result == 0 && u.Processing_Result_Text == "UNIQUE");
Thank you :)
Reply
Answers (
2
)
Need to fetch User Email from Facebook api
how to scan & save barcode on c#.net window form application