I created an inherited CSLA BO, it worked OK until I moved it into WCF, the probolem is:
Index was outside of the bounds of array.
But this doesn’t work for my WCF. In fact, I don’t even have this problem in my non-WCF mode app.
Still the static propertyInfo field problem, I later found another trick similar to Rocky’s dummy field one.
Calling the private constructor right before DataPortal mehod.
Example, my OrganizationBO is inherited from a base StakeholderBO, so the revised factory method looks like this:
public static OrganizationBO GetOrganizationBO(int stakeholderId)
// Had to add this line to make it work in WCF mode.
// Why? 2008.06.25
// Might be to force static register field run earlier.
return DataPortal.Fetch<OrganizationBO>(new SingleCriteria<OrganizationBO, int>(stakeholderId));
P.S., This post is very helpful when you got maxReceivedMessageSize in WCF configuration.