Concerns / Questions

Feb 3, 2010 at 4:31 PM

1. When are you planing to include implementation example, that will be a big help

2. You think "T sourceObject = (T)Activator.CreateInstance(type);" will be an expensive operation as this will be called for every single object(reflection). Especially talking from an Enterprise level application. I thought of this implemenation in past but never did it with the fear of performace hit, as the kinda application I worked were very performance centric.

3. Will Convert() take care of complex object hirarchy too ? Example if we are trying to create Customer object and Customer has Orders, will it populate Customer & Order both.


Anyways, good job. This definitely can be save developers lot of redundant & repetitive code of mapping Object to Table and save time too.



Feb 4, 2010 at 7:23 AM

1. I will try and put an implementation in the next 2 weeks.

2. Tried `new T()` which was slower, activator performance was ok, of course if you are converting say 10k plus (guesstimate) object then you may see a noticable perf issue,  But fundamentally if you are converting such huge set of records to DTOs then you need to relook at the reason for doing so. Usually only in reporting scenarios we require such conversions, in a such a scenario convertion does not make much sense, use DataTables or move to Sql Server Reporting Services etc

3. No, hierarchial conversion is not implemented in this release, this will much in a much later release.

Yes, I had looked for any available tool back in 2007 for the mappting via xml and could not find any and created this.

Next step is to get a implemtation working, and then I am planning to enhance the configuration style used to specify the mapping.

Feb 5, 2010 at 12:45 PM

Good news!

Finally found time to write the sample implementation.
Its made available today just go to the downloads section and get the file
Also enhanced the configuration style used.

It has NUnit tests for the basic conversion scenarios (There are many types of conversions I have addressed the basic ones)
This should be enough for you to get started.

Feb 14, 2010 at 8:56 PM