I want to perform a selection by 2 Entity ( AppRoles and AppUsers) ,
If in SQL, i would do this, For example :
SELECT u.*, r.* FROM AppUsers u ,AppRoles r WHERE u.RoleID = r.RoleID
Also it can be done using LINQ Syntax in Code-Behind.
However, i don’t know how to do in EntityDataSource
Below is my mark-up :
<asp:EntityDataSource ID="edsUsers" runat="server"
ConnectionString="name=ReferralDBEntities"
DefaultContainerName="ReferralDBEntities" EnableFlattening="True"
EntitySetName="AppUsers"
Include="AppRoles"
Select="it.AppUsers, it.AppRoles"
Where="it.AppUsers.RoleID = it.AppRoles.RoleID"
>
</asp:EntityDataSource>
But it show the error.
An older post not answered.
Try removing the Select=”it.AppUsers, it.AppRoles”
Otherwise I am not sure how the relationship between your two tables is setup in the EDMX. You may want to check those also.