Castle ActiveRecord
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.
[ActiveRecord]
public class Blog : ActiveRecordBase
{
private int id;
private string name;
private string author;
[PrimaryKey]
public int Id
{
get { return id; }
set { id = value; }
}
[Property]
public string Name
{
get { return name; }
set { name = value; }
}
[Property]
public string Author
{
get { return author; }
set { author = value; }
}
}
ActiveRecord resources: