title: Entity Framework Overwriting ID Values
body: <p>I am running into the same exact problem as asked in this question: <a href="https://stackoverflow.com/questions/1648907/entity-framework-foreign-keys-and-entitykeys">Entity Framework, Foreign Keys, and EntityKeys</a> where my Foreign ID key values are being reverted back to 0 before I am able to send the information to the database. This results in the error:</p>
  
  <blockquote>
    <p>The INSERT statement conflicted with
    the FOREIGN KEY constraint
    "FK_Selection_Type".
    The conflict occurred in database
    "GenericDB", table
    "dbo.Type", column
    'TypeID'.</p>
  </blockquote>
  
  <p>Unlike the poster of that question, I do not have the option to just use a primitive identifier. (The Selection table currently has two foreign keys as its primary key - GenericID + TypeID.) I know what is happening and why it's not working from a shallow level, but I cannot figure out why the ID values are not staying set to what I set them to and are, instead, reverting to 0 after the user POSTs their data selections.</p>
  
  <p>Can anyone help clear this up a bit? It's making me nuts. (Everything else has worked so far with the Entity Framework.) Thank you.</p>