MembershipIdentity DataPortal_Fetch missing?

MembershipIdentity DataPortal_Fetch missing?

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


nelis posted on Friday, August 27, 2010

I read the book about the MembershipIdentity base class. On inspection of the code I couldn't find any call to LoadCustomerData. I suppose the DataPortal_Fetch method is missing or am I missing the point?

JonnyBee replied on Friday, August 27, 2010

Hi,

You must keep in mind that this is a base class. The intended use is to create your own class that inherits from MembershipIdentity base class and your class must implement how to load data.

LoadCustomerData is a virtual method for you to override in your class to load custom data.

    /// Override this method in a subclass to load custom
    /// data beyond the automatically loaded values from
    /// the membership and role providers.
    public virtual void LoadCustomData() { }

nelis replied on Friday, August 27, 2010

I understood that part. But the base class nowhere seems to invoke that method.

RockfordLhotka replied on Friday, August 27, 2010

What version of CSLA are you using currently?

The MembershipIdentity class has changed over time, and it is no longer the same as it was in 3.6 when the book was written.

nelis replied on Friday, August 27, 2010

I was looking at the sources of 4.0.0

RockfordLhotka replied on Friday, August 27, 2010

Yeah, CSLA 4 is different from 3.6.

I think the thing you are missing is that this class uses an object factory, which is in the Csla.Web project: IdentityAppFactory

It is the factory object that invokes LoadCustomData.

Copyright (c) Marimer LLC