ActiveRecord - ActiveRecord pattern for .NET

  •        0

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 free the developer of writing XML for database-to-object mapping, which is needed when using NHibernate directly.

With Castle ActiveRecord you won't have to learn NHibernate mapping schema to have a working data access layer in minutes. For most cases you won't need to deal with ISession and ISessionFactory.

Castle ActiveRecord was built on top of NHibernate. It offers:

  • Fast development (it handles the mapping and infers as much as it can so you don't have to dig into documentation or deal with tons of xml files every time something changes on your schema)
  • Predefined common methods like Create, Update, Save, Delete
  • Easy to implement method like Find, FindAll, FindByName. (Predefined if you use ActiveRecordBase)
  • Session and transaction scopes that abstracts the ISession offering a more natural idiom



comments powered by Disqus

Related Projects

NHibernate - object-relational mapper for .NET

NHibernate is a mature, open source object-relational mapper for the .NET framework. NHibernate is a port of Hibernate Core for Java to the .NET Framework. It handles persisting plain .NET objects to and from an underlying relational database.


SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL. It provides a full suite of well known enterprise-level persistence patterns, designed for efficient and high-performing database access, adapted into a simple and Pythonic domain language.

Propel - smart easy object persistance in PHP

Propel is an open-source Object-Relational Mapping (ORM) for PHP5. It allows you to access your database using a set of objects, providing a simple API for storing and retrieving data. Propel uses PDO as an abstraction layer, and code generation to remove the burden of runtime introspection. Therefore Propel is fast.

Doctrine ORM - Object relational mapper for PHP

Object relational mapper (ORM) for PHP that sits on top of a powerful database abstraction layer (DBAL). One of its key features is the option to write database queries in a proprietary object oriented SQL dialect called Doctrine Query Language (DQL), inspired by Hibernates HQL. This provides developers with a powerful alternative to SQL that maintains flexibility without requiring unnecessary code duplication.

SubSonic - Data access for .NET

SubSonic is A Super High-fidelity Batman Utility Belt that works up your Data Access (using Linq in 3.0), throws in some much-needed utility functions, and generally speeds along your dev cycle.

BL-Toolkit - Business Logic Toolkit for .NET

Business Logic Toolkit is a set of components to simplify .NET application development. BLToolkit is provided as source code that you can use "as is" or customize for your applications. It is written in C# and compatible with .NET Framework 3.5 and 4.0.

Dapper-dot-net - Simple SQL object mapper for ADO.NET

Dapper - a simple object mapper for .Net. It is a single file you can drop in to your project that will extend your IDbConnection interface. Dapper's default behavior is to execute your sql and buffer the entire reader on return. This is ideal in most cases as it minimizes shared locks in the db and cuts down on db network time.

nHydrate - Conceive, Model, Generate

nHydrate is an object-relational mapping (ORM) solution for the Microsoft .NET platform providing a framework for a relational database to be mapped to .NET objects. It is designed to alleviate the software developers experience writing persistence domains. The model controls database generation, LINQ syntax, API, DAL, etc.

Fluent NHibernate - Fluent mapping for model

Fluent, XML-less, compile safe, automated, convention-based mappings for NHibernate. Fluent NHibernate offers an alternative to NHibernate's standard XML mapping files. Rather than writing XML documents, you write mappings in strongly typed C# code. This allows for easy refactoring, improved readability and more concise code.

Outlet - object-to-relational mapping for PHP

Outlet differs from other orm solutions for php in that it provides transparent, unobtrusive persistence. It does not require your entity objects to implement any interfaces or extend some sort of base class. It is also very lightweight, only a handful of classes and tools.