virtualDataPortal_Create(object)virtualDataPortal_Create(object)
Old forum URL: forums.lhotka.net/forums/t/4238.aspx
jh72i posted on Friday, January 25, 2008
Where has my virtual DataPortal_Create(object)gone!? I've read the change log but I'm confused as to how I can supply the create with the information it needs to populate it's defaults(from the various data sources)?ajj3085 replied on Friday, January 25, 2008
Well, you can still do that, but its not a base. The default for DP_C doesn't take parameters.
just do private void DataPortal_Create( object ).
Better yet, create a class that derives from CriteriaBase, and do
private void DataPortal_Create( MyCriteriaBaseSubClass criteria ) ;
jh72i replied on Friday, January 25, 2008
Thanks ajj3085. I actually extend Rocky's classes anyway so I'll have to do it here but I find it odd that such a breaker was included - like a majority of our classes in a number of apps override that old method.ajj3085 replied on Friday, January 25, 2008
Yes, but it was a breaking change made with good cause. Since the introduction of Criteria base, you either Create with no parameters at all, or use a strongly typed CriteriaBase subclass, which means you can have seperate DataPortal_Creates for different criteria, whereas the old way you'd need to do type checking in one DP_C.
Rocky has been making breaking changes if the result will make things better in the long run, even if it means you need to rework some code, or in your case add the virtual method back.
You might want to check the change logs, because he has pointed out the breaking changes according to their likelyhood of impact during an upgrade.
Andy
Copyright (c) Marimer LLC