Cloning data on Entity Framework -


I am creating software where the user can create a new product based on the old product.

Now I started copying / cloning operations with unit framework, first I started writing like this:

(sourcedata1 in table 1) {... create new table ... Copy data ... Create Guid ... Add foreach (sourcedata2 in table 2) {.. Create new table ... Copy data ... Make mess ... Add ... and so on}}

The problem is that there is not a good way to do this. Is there an easy way to know about the clone (except for the good that needs to be generated for new lines) or should I manually copy everything?

Other Solutions

You can also use Eitimper or Automaker to copy properties.

Using direct serialization, you can:

Using reflection, but with a lot of code you can do this:


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -