The current documentation link is :
http://www.castleproject.org/activerecord/documentation/trunk/advanced/accessingmoredbs.html

For additional clarification in the trunk documentation, is it
possible to add an example of how to initialize your a second database
with its corresponding models after create the required abstract class
that inherits from ActiveRecordBase.


For example:

If you had your 1st database named: Blog, and had 2 Model Classes
associated with it
of : 1) User Model Class: User, 2) Post Model Class: Post.

For your second database you created:
Abstract Class name: AbstractPayment
1) Transaction Model Class for PaymentDb: Transaction
2) Fees Model Class for PaymentDb: Fees

Initialize ActiveRecord for 1st and 2nd db:

 ActiveRecordStarter.Initialize(GetConfigSource(),typeof(User),
typeof(Post),
 
typeof(AbstractPayment),typeof(Transaction),typeof(Fees));

Method: GetConfigSource:

protected IConfigurationSource GetConfigSource()
        {
            return ConfigurationManager.GetSection("activerecord") as
IConfigurationSource;
        }

Cheers,

Dave




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to