title: Inserting a record with specified primary key into MySQL via Entity Framework
body: <p>We began using Entity Framework with MySQL in our project recently. Now I am writing unit tests for the data access level; for that purpose I have created a database with some test data.</p>
  
  <p>In the test-method for the Delete method I want to first delete a specified record and then insert it again with all the fields holding exactly the same values, including the Id column which is set as the primary key. The purpose is to keep the test data in the DB.</p>
  
  <p>But when I insert previously deleted record, Entity Framework just ignores the Id value of the entity and thus a new Id is generated using AUTO_INCREMENT.</p>
  
  <p>Thanks in advance.</p>