Mapping LINQ to SQL table to another very similar table without iterating through every one
- by Daniel Coffman
Apologies for the vague question. Here it is: I have a table object created by LINQ to SQL. I am copying entries from one table to an "archive" table that has all the columns of the original, plus a couple extra ones.
It feels sloppy to iterate through every object and manually define the mapping like:
foreach (oldTable in dbContextOldTables)
{
…