How to copy one complete row?

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
software931
Posts: 11
Joined: Tue 18 Sep 2012 07:55

How to copy one complete row?

Post by software931 » Thu 20 Sep 2012 09:40

Is there an easy way to copy one complete row, and overwrite the key columns afterwards?

I have a table with a lot of columns. I don't like to write a copy routine manually, because there are so much columns.

Is there any way to copy them all together?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: How to copy one complete row?

Post by Shalex » Mon 24 Sep 2012 11:13

software931 wrote:Is there an easy way to copy one complete row, and overwrite the key columns afterwards?
There are three ways:
1) write your own code for cloning each object;
2) use some "third-party" code/library like http://stackoverflow.com/questions/1334 ... rence-type
3) we will implement the "Implement IClonable" option in our Entity Developer templates to generate all objects with the IClonable implementation. We will post here when the corresponding build of Entity Developer is available for download.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: How to copy one complete row?

Post by Shalex » Wed 03 Oct 2012 08:53

The "Implement IClonable" option for the generated classes based on the model entities is added to all templates. We will post here when the corresponding build of Entity Developer is available for download.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: How to copy one complete row?

Post by Shalex » Thu 04 Oct 2012 16:23

New version of Entity Developer 4.7 is released!
It can be downloaded from http://www.devart.com/entitydeveloper/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=32&t=25013.

Post Reply