title: Using ObjectDataSource and DataObjectTypeName, How Do You Handle Delete Methods With Just An Id Parameter?
body: <p>If I have an ObjectDataSource setup like:</p>
  
  <pre><code>&lt;asp:ObjectDataSource 
      ID="ObjectDataSource1" 
      runat="server" 
      DataObjectTypeName="Employee"
      InsertMethod="Insert" 
      UpdateMethod="Update"
      DeleteMethod="Select" 
      TypeName="EmployeeDB"&gt;
  &lt;/asp:ObjectDataSource&gt;
  </code></pre>
  
  <p>and a data/business object with methods like:</p>
  
  <pre><code>public class EmployeeDB
  {
      public void Insert(Employee emp)
      public int Update(Employee emp)
      public bool Delete(int id)
  }
  </code></pre>
  
  <p>How do I get the objectdatasource to use the Delete method with the parameter that is not an Employee object?</p>
  
  <p>If this is not possible, what is the recommended alternative architecture?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>To clarify, I want to use the method signature on my data/business object as shown above, however if I try to allow an Employee object to be passed into some of the methods using DataObjectTypeName, then I seemingly lose the ability to have some methods take just an integer id for instance.</p>
  
  <p>If I do not use the DataObjectTypeName, then I have to place all the method parameters in the ObjectDataSource and change the methods on the data/business object to match, this seems like a bad design choice because as the Employee object changes I will have to update each of these methods.
  Is there a better architecture?</p>