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
Neethu pradeep
NA
36
10.6k
Single linq Statement
Nov 29 2018 11:14 PM
I wrote multiple linq statement ... and how it make as single linq statement.. and my code is given below
if
(Filter !=
" "
)
{
details = (from e
in
Country_Details where e.Country.ToLower().StartsWith(Filter.ToLower()) select e).ToList();
if
(details.Count <= 0)
{
details = (from e
in
Country_Details
where e.Capital.ToLower().StartsWith(Filter.ToLower()) select e).ToList();
if
(details.Count <= 0)
{
details = (from e
in
Country_Details
where e.Region.ToLower().StartsWith(Filter.ToLower()) select e).ToList();
if
(details.Count <= 0)
{
details = (from e
in
Country_Details
where e.S_region.ToLower().StartsWith(Filter.ToLower()) select e).ToList();
}
}
}
}
Reply
Answers (
4
)
Filtering List contains List
How to bind a key of linq into xaml listview