I want to do what I would think is a simple task but I am having a hard time with this using the entitydatasource.....
I have two tables in my entity model with a one to many relationship...
I need two datasources in my app....
the first I would pull from my blog entry table(1) this is my master form...
I then want to pull all the records associated with the master's ID from a second table(many)
How do I query for this? This seems like a simple task but yet I am having trouble finding any information on this...
I know about controlparameters but in my case it doesn't seem to work...
<asp:EntityDataSource ID="EntityDataSource1" runat="server"
ConnectionString="name=travlan_Teaching_BlogEntities"
DefaultContainerName="travlan_Teaching_BlogEntities"
EntitySetName="Blog_Entries"
Select="it.[ID], it.[Series], it.[Unit], it.[Start_Date], it.[End_Date], it.[Post_Date], it.[Additional_Comments]"
orderby="it.[Post_Date] DESC">
</asp:EntityDataSource>
<asp:EntityDataSource ID="EntityDataSource_ReadingB" runat="server"
ConnectionString="name=travlan_Teaching_BlogEntities"
DefaultContainerName="travlan_Teaching_BlogEntities" EntitySetName="Links"
Select="it.[Class_Level], it.[Class_Type], it.[Link_Type], it.[Title], it.[Description], it.[URL], it.[Picture_Thumb_Location], it.[Picture_Location], it.[Picture_Alt], it.[Article_Number], it.[Article_Title]"
AutoGenerateWhereClause="true">
<WhereParameters>
<asp:ControlParameter ControlID="FormView1" Name="Blog_Entries.ID" />
</WhereParameters>
</asp:EntityDataSource>
for the master form I just pull all blogentries but if I try to use the ControlParameter and pull the details associated to these entries I get all the details. In other words the details are not being filtered....
I've tried alot of solutions... what boggles me is that I can't reference my foreign key(entitydatasource_ReadingB) in my select statement...