join - Using LINQ to select values from a list based on values from joined list -
i have model involves set of units. each unit has set of numbers. i'm writing provider method returns list of units contain of given numbers.
there 2 tables involved in query - units
table, , numberunits
table. numberunits
table links units
numbers
(but since know numbers required, we're not interested in them).
i have this:
var = (from units in dataprovider.units bring together numunits in dataprovider.numberunits on units.id equals numunits.unit numbers.contains(numunits.number) select units);
where numbers
list of numbers searching with. want homecoming unit
has numberunit
found in list of numbers, returning nothing.
any ideas?
looks i'm idiot. works fine, turns out have info issues huge portion of units supposed have entries in numberunits table not.
linq join
No comments:
Post a Comment