I have 4 entities
Product no Enumerable interface
ProductFieldLookup has Enumerable interface
Lookup no Enumerable interface
LookupType has Enumerable interface
var pfl = (from pflSet in p.ProductsFieldsLookups
where pflSet.IsAvailable = true
select pflSet).ToList();
I want to retrieve lookups data that is connected to the returned list
and apply a filter on retrieval I think using linq seems to be most efficent
I am avoiding foreach so as to filter on retrieval of the data rather than
after retrieval.
the first way I thought to do this is by copying the structure above
var plt = (from ltset in pfl.LookupType
where ltset.IsEditable = true &&
ltset.IsCreatable = true
select ltset).ToList();
the error is that pfl.LookupType does not have a defintion for lookupType
now if I use a foreach loop as follows
foreach(ProductsField pfl in p.ProductsFieldsLookups())
{
LookupType l = pfl.LookupType;
}
this works anyone any ideas ?