title: How dbml should be written when a stored procedure returns multiple result sets?
body: <p>Is there any way to also modify dbml so that the method in designer.cs stays as IMultipleResults?</p>
  
  <p>I have a stored procedure that returns 2 sets of data.
  When I drag &amp; drop the procedure to dbml, xml and designer.cs generated by dbml</p>
  
  <pre><code>&lt;Function Name="dbo.MultiResultsTest" Method="MultiResultsTest"&gt;
  &lt;Parameter Name="iCustomerID" Type="System.Int32" DbType="Int" /&gt;
  &lt;Parameter Name="iProductID" Type="System.Int32" DbType="Int" /&gt;
  &lt;ElementType Name="MultiResultsTestResult"&gt;
    &lt;Column Name="CustomerID" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" /&gt;
    &lt;Column Name="Name" Type="System.String" DbType="VarChar(MAX)" CanBeNull="true" /&gt;
    &lt;Column Name="Phone" Type="System.String" DbType="VarChar(14)" CanBeNull="true" /&gt;
    &lt;Column Name="Email" Type="System.String" DbType="VarChar(MAX)" CanBeNull="true" /&gt;
    &lt;Column Name="Address" Type="System.String" DbType="VarChar(MAX)" CanBeNull="true" /&gt;
  &lt;/ElementType&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>[global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.MultiResultsTest")]
  public ISingleResult&lt;MultiResultsTestResult&gt; MultiResultsTest([global::System.Data.Linq.Mapping.ParameterAttribute(DbType="Int")] System.Nullable&lt;int&gt; iCustomerID, [global::System.Data.Linq.Mapping.ParameterAttribute(DbType="Int")] System.Nullable&lt;int&gt; iProductID)
  {
      IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), iCustomerID, iProductID);
      return ((ISingleResult&lt;MultiResultsTestResult&gt;)(result.ReturnValue));
  }
  </code></pre>
  
  <p>And to get the multiple results I modified the designer.cs to like this:</p>
  
  <pre><code>[global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.MultiResultsTest")]
  [ResultType(typeof(Customer))]
  [ResultType(typeof(Product))]
  public IMultipleResults MultiResultsTest([global::System.Data.Linq.Mapping.ParameterAttribute(DbType="Int")] System.Nullable&lt;int&gt; iCustomerID, [global::System.Data.Linq.Mapping.ParameterAttribute(DbType="Int")] System.Nullable&lt;int&gt; iProductID)
  {
      IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), iCustomerID, iProductID);
      return (IMultipleResults)(result.ReturnValue);
  }
  </code></pre>
  
  <p>This works fine but because of the dbml, when I add more to it and save the method in designer.cs reverts back to the ISingleResult one.</p>