c# - where clause in entityDataSource with field from other table entity -
i've got 3 tables, products, productspercategory , category. can choose category, after products category listed.
but cannot seem work.
i using entity framework, have created 2 entitydatasources, 1 products , 1 productspercategory. i've got id category in variable in code.
i have added parameter productspercategory entitydatasource.
<whereparameters> <asp:controlparameter controlid="categoryid" name="category_id" propertyname="value" /> </whereparameters>
but need add parameter products entitydatasource show products in productspercategory entitydatasource. how can this?
database structure:
category table contains: name, categoryid productspercategory table contains: id, categoryid, productid product table contains: productid, name
so want product names in entitydatasource belong selected categoryid
i solved using sqldatasource
Comments
Post a Comment