Sign in
Google apps
Main menu
Post a Comment On:
Blogpad
"Linq queries vs Lambda queries"
No comments yet. -
1 – 0 of 0
foreach (var id in _clientIds)
{
items.AddRange(
clients.Where(x => x.ClientID == id)
);
}
// rest of the clients
items.AddRange(
clients.Where(x => !_clientIds.Contains(x.ClientID))
);
VS
foreach (var id in _clientIds)
{
items.AddRange(from c in clients
where c.ClientID == id
select c);
}
// rest of the clients
items.AddRange(from c in clients
where !_clientIds.Contains(c.ClientID)
select c);
posted by fc at
9:46 PM
on Dec 31, 2010
Leave your comment
You can use some HTML tags, such as
<b>, <i>, <a>
This blog does not allow anonymous comments.
Google Account
You will be asked to sign in after submitting your comment.
Please prove you're not a robot
"Linq queries vs Lambda queries"
No comments yet. -