title: How to "transfer" the data from one table to another with EF?
body: <p>I have two tables in my database that contains the same columns. I have a record in one table (named TB1) and I want to "transfer" it to the another one (named TB2) using EF.</p>
  
  <p>I'm not very familiar with EF, so my thoughts were in this direction:</p>
  
  <pre><code>var testEntity = new TestEntities();
  var data1 = testEntity.TB1.Find(id);
  var data2 = new TB2();
  
  // Pass all the properties from one object (data1) to another (data2)
  
  testEntity.TB2.Add(data2);
  testEntity.TB1.Remove(data1);
  testEntity.SaveChanges();
  </code></pre>
  
  <p>But, to continue with this logic, I have to pass all the properties from one object to another, manually. And it contains a lot of properties (about 50).</p>
  
  <p>As they have the same properties, I really think there must be an easier way to execute this process, but I don't know how.</p>
  
  <p>Is there an easier way to "transfer" this data?</p>