The Castle ActiveRecord project is an implementation of the ActiveRecord pattern for .NET. The ActiveRecord pattern consists on instance properties representing a record in the database, instance methods acting on that specific record and static methods acting on all records.
Castle ActiveRecord is built on top of NHibernate, but its attribute-based mapping frees the developer of writing XML for database-to-object mapping, which is needed when using NHibernate directly.
- Understanding Scopes - Explains the SessionScope and TransactionScope classes
- Validators
- XML Configuration Reference
- Getting Started - A tutorial for "how", after the introduction explains "what"
- Configuration and Initialization - Explains the configuration options and schema, and provides some illustrative examples as well
- Creating an ActiveRecord class
- The Persistency Lifecycle
- Primary Key Mapping
- Simple Column Mapping
- Relations Mapping
- Schema Generation
- Unit Testing
- Type Hierarchy - Discuss approaches to achieve inheritance within your object model and map it correctly to the underlying database
- Nested Data (NHibernate Components)
- Using HQL (Hibernate Query Language) - Illustrates the usage of HQL
- Native SQL Queries
- Using Scopes
- Enabling Lazy Load
- Validation Support - Presents the ActiveRecordValidationBase that is able to validate properties with predefined validators
- Best Practices - Some recommendations
- Web Applications
- Troubleshooting - Something went wrong? Check what problems we had and how we work around them
- Frequently Asked Questions
- External Articles on ActiveRecord