Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to pass the result of Linq as a Parameter
Message
 
To
All
General information
Forum:
ASP.NET
Category:
LINQ
Title:
How to pass the result of Linq as a Parameter
Miscellaneous
Thread ID:
01520475
Message ID:
01520475
Views:
78
I have a piece of Linq Code as:

var queryRep =
(
from rows in dt.AsEnumerable()
where rows.RowState != DataRowState.Deleted
group rows by new { Rep = rows.Field string ("Rep") }
into myGroup
select new { Rep = myGroup.Key.Rep }
);

This 'Creates' a queryRep which I now want to pass into another method, and use it. What is the syntax for doing this
e.g.

MyMethod(queryRep)

public void MyMethod(xxx queryRep)
{
// do stuff with the output from the linq statement
}
Next
Reply
Map
View

Click here to load this message in the networking platform