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())
- 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