I have a SQL table that contains records that I want to move over to an almost identical table using Entity Framework. i.e. moving records from main table to an archive table.
The second table is a superset of the original table in that it has a few extra fields to designate archive date, etc…
Is there a simpler way to accomplish this then manually matching each field from the original entity to the archive entity?
I looked at Automapper but see that it only works with in memory entities and not my data which is Iqueryable.
TIA
John
(EF newbie)
One way to do this is to have 2 entity classes (one for the transaction table and one for the archive table) and use the AutoMapper to populate the archive object from the transactional object, and call the SaveChanges.