I have an Orders table and an Assignments table which I join together using LINQ to Entities. Each order has a product and a quantity. Each order has a number of assignments up to the quantity. I want to output the following:
Orders:
ID | OrderCode | Quantity | Other Columns...
1 | 30000-1 | 3 | ...
2 | 41000-7 | 2 | ...
Assignments:
OrderID | Assignment | Other Columns...
1 | 4526 | ...
2 | 2661 | ...
2 | 5412 | ...
I want to output a table like:
OrderCode | Assignment
30000-1 | 4526
30000-1 |
30000-1 |
41000-7 | 2661
41000-7 | 5412
Any advice would be welcome!