vb.net - Filter The Entities by Linq -
here situation:
i need bind entityset repeater.
the old way is:
reppackageproducts.datasource = package.packageproducts reppackageproducts.databind()
note: package entity, packageproducts entityset
now, need filter packageproducts base on own packageproductpricingvars's column isnew(true/false).
i use linq this, cannot add statement:
dim s = (from b in package.packageproducts select b.packageproductpricingvars).where...
i'm stuck @ .where
. not shows column name of packageproductpricingvars need filter.
please give me hint. thank you!
you have 2 options:
1- query syntex:
dim s = p in package.packageproducts _ p.packageproductpricingvars.isnew = true _ select p.packageproductpricingvars
2- method syntax:
dim s = package.packageproducts _ .where(function(p) p.packageproductpricingvars.isnew = true) _ .select(function(p) packageproductpricingvars)
Comments
Post a Comment