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
yesubabu k
1.1k
644
63.4k
how to get the details from select query like where in
Nov 15 2019 10:34 PM
Hi All,
I'm New to LINQ, can you help me
how to get the details from select query like where in clause
ex:
public
List<LocationDetailInfo> GetLocationsListDB(
string
[] areaId)
{
using
(DbHelper db =
new
DbHelper())
{
var locationList = (from location
in
db.LocationMasters
where areaId.Contains(location.AreaId.ToString())
//Ids.Contains(location.AreaId)
select
new
LocationDetailInfo
{
LocationId = location.LocationId,
LocationName = location.LocationDesc
}).OrderBy(o => o.LocationName).Distinct().ToList();
return
locationList;
}
}
but this logic is not get the details
Reply
Answers (
7
)
Get controller action linq query for complex binding model
can we do linq groupby in side another groupby list?