Hi there -
I'm new to Entity Framework and still working my way through the gridview control. I'm not sure where to put this question, so I figured I would start here.
I have an entity framework (EF) with a header-detail model. When I perform the linq query with an include, I want to display the sub entities (the details) in the grid. Would be even nicer if I group group by the details (all in one grid).
So my questions may be, how do I write/use the linq query to bring back the headers and group the details within the same grid. Here is what I have so far:
I appreciate any information or direction possible.
Thanks
Bob
I'm new to Entity Framework and still working my way through the gridview control. I'm not sure where to put this question, so I figured I would start here.
I have an entity framework (EF) with a header-detail model. When I perform the linq query with an include, I want to display the sub entities (the details) in the grid. Would be even nicer if I group group by the details (all in one grid).
So my questions may be, how do I write/use the linq query to bring back the headers and group the details within the same grid. Here is what I have so far:
Private
Sub
loadLotDetails(PO_Number
As
String
)
Dim
query = From l
In
context.Lot_Header.Include(
"Lot_Detail"
)
Where l.Lot_Number = PO_Number
And
l.Lot_Process_Status <>
"90"
Select
l
lotDetailsGridView.DataSource = query
End
Sub
I appreciate any information or direction possible.
Thanks
Bob