ObjectDataSource - missed the mark ?

G

gerry

I started looking into the ObjectDataSource and I really like it.
It does seem to me though that they really missed the mark in one respect -

The designers went through the trouble to allow the use of
DataObjectTypeName to have custom objects passed to your dal methods.
So why did they then turn around and have
ConflictDetection="CompareAllValues" cause the old field values to be passed
as individual arguments instead of following through with the OO theme and
simply pass in a second object that contains the old values. This strikes
me as extremely inconsistent not to mention a pain in the maintenance ass.

ie instead of DAL.Update(CustomObject,original_ID , original_Name ,
original_Age , original_Fielda , original_Fieldb, original_Fieldc,
original_Fieldd, original_Fielde , ...)
why not DAL.Update(CustomObject , OldCustomObject ) ?

Am I missing something - is this behaviour available through the
ObjectDataSource ?
Is there a way to derive a custom ObjectDataSource to provide this behaviour
?
Does anyone know if the ObjectDataSource source is available to add this
behaviour ?

Gerry
 
G

gerry

ok - I found it.

after much futsing around and reminding myself to compeletely ignore all
documentation I determined that OldValuesParametersFormatString contains the
name for the OldValues object passed into the update method call and does
not actually do any formatting at all. Why this name is required I am not
sure - i guess it was too simple to decide that the update method takes 2
objects , the 1st is the new values and the second is the old values.

Gerry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top