Is a Mirror Object of ObjectAdapter available?

Is a Mirror Object of ObjectAdapter available?

Old forum URL: forums.lhotka.net/forums/t/3119.aspx


RockoWPB posted on Thursday, June 28, 2007

After using ObjectAdapter to convert my BO properties to a dataset. I have to wonder is there a mirror object to ObjectAdapter? One that converts from the dataset to BO properties. I found SafeRowReader and it works great but you still have to load the properties yourself. Am I missing something obvious?

Also, is there a way for ObjectAdapter to not create columns for certain properties of the business object or better yet only copy the properties of the BO that have matching columns in the dataset?

I am a newbie to CSLA and am just starting to get a grasp of it, so forgive me if these seam like silly questions.

RockfordLhotka replied on Friday, June 29, 2007

CSLA doesn't include anything to copy data from a DataTable into an object, no. I might do that in version 3.5, though my primary focus will be on providing richer copying from object-to-object for LINQ/EF support.

It has been a long time since I've done any work on the OA. However, if I remember correctly it will copy data into a pre-defined DataTable, and in that case will only copy the properties that correspond to the pre-defined columns.

Please remember that OA was created very specifically to enable a reporting scenario where the data from an object must be in a DataSet so it can be bound to something like a Crystal Report. Any other usage is beyond its purpose.

Copyright (c) Marimer LLC