This template's attribute-based mapping frees you from writing XML for database-to-object mapping, which is needed when using NHibernate directly. This template is currently available only for C#.
Castle ActiveRecord template has the following properties:
Description
Description of the template.
Enabled
Indicates whether the template is enabled. Acceptable values are True or False.
File Name
The name of the template file.
Name
The name of the template.
Type
The type of the template.
Generate Data Contracts
Determines whether the DataContract/DataMember attributes used for serialization of entities should be generated. Acceptable values are True or False.
Header Timestamp Version Control Tag
Setting this option will replace the standard date/time stamp in the file header with the specified tag (e.g. a version control tag for Subversion, Git, etc.)
Implement Equals
Defines whether each entity class will implement its own Equals and GetHashCode methods. Acceptable values are True or False.
NHibernate V3 Compatible
Determines the types used for collection properties of the Set type. If it is set to True, the Iesi.Collections.dll types are used for collection properties of the Set type. This requires NHibernate version 3. Otherwise, the .NET Framework System.dll types are used for collection properties of the Set type - this requires Nhibernate of version 4 and higher.
Property Change Notifiers
Defines whether each model class will implement the INotifyPropertyChanging, INotifyPropertyChanged interfaces. Acceptable values are True or False.
Property Change Partial Methods
Set this property to True to generate the extensibility partial void On<property name>Changing and partial void On<property name>Changed methods. These methods handle changes of each object property. Acceptable values are True or False.
Entities Output
Allows specifying the output folder for the generated entity classes. The value of this property is taken into account during generation only if the File Per Class property is set to True.
Project
(This property is available in the Visual Studio add-in only) The name of the Visual Studio project where the generation result will be located.
Project Folder
(This property is available in the Visual Studio add-in only) The name of the directory in the Visual Studio project where the generation result will be located.
Destination Folder
(This property is available in the standalone application only) The directory to contain the generation results.
File Per Class
Defines whether each model class will be placed into a separate file when generating code. Acceptable values are True or False.
Generate Partial Class
Defines whether for each class of the model a partial class will be generated, in which it will be possible to add code that won't be overwritten by the designer.
Model Name As Files Prefix
Defines whether to add the model name to the generated file names as a prefix.
Validation Error Messages
Specifies error messages to associate with a validation control if validation fails. If you do not want to use hardcoded error messages (e.g. for the sake of internationalization), you can use error messages stored in the application resources. For this, specify the name of the resource type for error messages in the following format: ResourceType=<type name>. Additionally, the resource name for your error message for the corresponding validator must be equal to the name of a property from the ValidationErrorMessages property.
Email Message
Specifies the error message to associate with a validation control if email validation fails.
Expression Message
Specifies the error message to associate with a validation control if regular expression validation fails.
IPAddress Message
Specifies the error message to associate with a validation control if IPAddress validation fails.
Length Message
Specifies the error message to associate with a validation control if length validation fails.
Numeric Message
Specifies the error message to associate with a validation control if numeric validation fails.
Range Message
Specifies the error message to associate with a validation control if range validation fails.
Required Message
Specifies the error message to associate with a validation control if required validation fails.
Validation Framework
Defines the set of attribute types and its source to be used for validating the property values of generated classes. Acceptable values are EnterpriseLibrary, NHibernateValidator, DataAnnotations, None.