title: Multiple relationship binding with EntityDataSource
body: <p>I have an ADO .Net Entity Data Model for my database.  In this Model I have three related tables:
  "Users" Table containing UserId and other details.
  "Run" Table that contains RunId, ApproverId and other details
  "RunToUser" that contains UserId and RunId columns</p>
  
  <p>The relationships are as follows:
  Users.UserId is a one to one relationship to Run.ApproverId
  User.UserId is many to many with RunToUser.UserId
  Run.RunId is many to many with RunToUser.RunId</p>
  
  <p>In the Entity Model this is expressed as two tables with 2 separate relationships.  the one-to-one relationship and the many-to-many relationship between Users and Run.</p>
  
  <p>I have a ASP.net Formview where I want to edit the data in Run as well as the related data in Users.</p>
  
  <p>Databinding is working in most cases.  However when I bind to the Users table as an entitydatasource it always is using the one-to-one relationship association.</p>
  
  <p>How can I force the entitydatasource to use a specific relationship association so that I can bind the data from the one-to-one mapping to a label and the many-to-many to a dataview?</p>
  
  <p>I tried the "EXISTS" in the where clause whichs limits the records but it still insists on always using the one-to-one and only displays the single user in all databound controls.  Here is the entitydatasource for the users: </p>
  
  <pre><code>  &lt;asp:EntityDataSource ID="edsUsers_DET" runat="server" 
          ConnectionString="name=MyEntities" DefaultContainerName="MyEntities" 
          EntitySetName="Users" 
          Where="EXISTS(SELECT VALUE p FROM it.Run AS p WHERE p.RunID = @RunID)" &gt;
          &lt;WhereParameters&gt;
             &lt;asp:ControlParameter ControlID="fvRun"  Name="RunID" Type="Int32" /&gt;
          &lt;/WhereParameters&gt;        
      &lt;/asp:EntityDataSource&gt;
  </code></pre>
  
  <p>I assume I will need two entity data sources one for the label and a second for the gridview but until I know determine how to specifiy an association I don't know how to proceed further.
  Thx,
  -J</p>