I've used the LinqDataSource successfully with a WHERE clause that applies to the table being selected.
What I need to do now, is select data from the table after using a WHERE clause on a related table instead of the "current" table.
Can this be done with LinqDataSource (I'm using LinqDataSource both for fast prototyping, plus built-in paging capabilities w/ GridView)?
I have 2 table objects in my User.dbml:
Provider: List of course providers)
ProviderXUser: Cross-reference table listing which of my website's users (UserDetails table) are also members of a Provider
I tried the following, but it throws the error (I've double-checked that FkUserDetailsId does exist in ProviderXUsers):
"No property or field 'FkUserDetailsId' exists in type 'EntitySet`1'"
<asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="UserDataContext"
TableName="Providers" Where="ProviderXUsers.FkUserDetailsId == 1 " >
<asp:Parameter DefaultValue="1" Name="Type" Type="Int32" />