title: MVC Entity Framework modifying child entities
body: <p>I'm quite new to using MVC3 and EF4 and I'm trying to implement the CRUD functions of a parent-child entity set, however I haven't found an example of some specific requirements that I need and therefore would like a bit of help.</p>
  
  <p>The situation I have is that I have a <code>Product</code> entity that has child <code>Category</code> entities. I have all of the CRUD functionality working fine for the <code>Product</code> entity and the detail functionality working with the <code>Category</code> entity within the <code>Product</code> details view. However I need to implement the addition and removal of child <code>Categories</code> from a given <code>Product</code>.</p>
  
  <p>Normally this wouldn't be much of an issue, but in this case when a user adds a <code>Category</code> to a <code>Product</code> I need to only allow the user to be able to select from a list of all available <code>Categories</code> from the database. The user will also be able to remove any of the existing child <code>Categories</code> from a <code>Product</code>.</p>
  
  <p>I expect implementing a DropDownList with all of the unused 'Categories' would work well, however I don't know how to use one to allow the user to add and remove 'Categories' and then save the changes to the database via EF.</p>
  
  <p>Has anyone got any suggestions/examples on how to accomplish this?</p>
  
  <p>If any extra information is required, please ask.</p>
  
  <p>Thanks very much.</p>