This is a migrated thread and some comments may be shown as answers.

Linq with Grid A query body must end with a select clause or a group clause

1 Answer 962 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nikola
Top achievements
Rank 2
Nikola asked on 21 Nov 2012, 08:40 AM
heey guys 


I have question what is wrong with my linq statement  , hope someone can explain me what  I am doing wrong 


     
if (this.selectLBU.HtUsers.Any())
                    {
                        reportRowItems = (from r in reportRowItems
                                          from bu in r.User.HtBusinessUnits
                                          where bu.LocationBusinessUnitId == selectLBU.LocationBusinessUnitId).ToList();
                    }

Thanks for help and fast answer

1 Answer, 1 is accepted

Sort by
0
Nikola
Top achievements
Rank 2
answered on 21 Nov 2012, 08:56 AM
Solution 

reportRowItems = (from r in reportRowItems
                   from bu in r.User.HtBusinessUnits
                   where bu.LocationBusinessUnitId == selectLBU.LocationBusinessUnitId 
                   select r 
                  ).ToList();
Tags
Grid
Asked by
Nikola
Top achievements
Rank 2
Answers by
Nikola
Top achievements
Rank 2
Share this question
or