Namespaces

Types in FluentNHibernate.Mapping

Type ClasslikeMapBase<T>

Namespace FluentNHibernate.Mapping

Methods

Properties

Public instance methods

void Component(IComponentMappingProvider componentProvider)

Allows the user to add a custom component mapping to the class mapping. Note: not a fluent method.
In some cases, our users need a way to add an instance of their own implementation of IComponentMappingProvider. For an example of where this might be necessary, see: http://codebetter.com/blogs/jeremy.miller/archive/2010/02/16/our-extension-properties-story.aspx

ReferenceComponentPart<T> Component<TComponent>(Expression<Func<T, TComponent>> member)

Creates a component reference. This is a place-holder for a component that is defined externally with a ComponentMap<T> ; the mapping defined in said ComponentMap<T> will be merged with any options you specify from this call.
Parameters
Expression<Func<T, TComponent>> member

Property exposing the component

Return
ReferenceComponentPart<T>

Component reference builder

ComponentPart<T> Component<TComponent>(Expression<Func<T, TComponent>> expression, Action<ComponentPart<TComponent>> action)

Maps a component
Parameters
Expression<Func<T, TComponent>> expression

Component property

Action<ComponentPart<TComponent>> action

Component mapping

DynamicComponentPart<T> DynamicComponent(Expression<Func<T, IDictionary>> memberExpression, Action<DynamicComponentPart<IDictionary>> dynamicComponentAction)

Create a dynamic component mapping. This is a dictionary that represents a limited number of columns in the database.
Parameters
Expression<Func<T, IDictionary>> memberExpression

Property containing component

Action<DynamicComponentPart<IDictionary>> dynamicComponentAction

Component setup action

MapBuilder<TKey, TValue> HasMany(Expression<Func<T, IDictionary>> memberExpression)

Maps a dictionary
Parameters
Expression<Func<T, IDictionary>> memberExpression

Collection property

OneToManyPart<TChild> HasMany<TChild>(Expression<Func<T, IEnumerable<TChild>>> memberExpression)

Maps a collection of entities as a one-to-many
Parameters
Expression<Func<T, IEnumerable<TChild>>> memberExpression

Collection property

MapBuilder<TKey, TValue> HasMany<TKey, TValue>(Expression<Func<T, IDictionary<TKey, TValue>>> memberExpression)

Maps a dictionary
Parameters
Expression<Func<T, IDictionary<TKey, TValue>>> memberExpression

Collection property

MapBuilder<TKey, TValue> HasManyToMany(Expression<Func<T, IDictionary>> memberExpression)

Maps a dictionary
Parameters
Expression<Func<T, IDictionary>> memberExpression

Collection property

ManyToManyPart<TChild> HasManyToMany<TChild>(Expression<Func<T, IEnumerable<TChild>>> memberExpression)

Maps a collection of entities as a many-to-many
Parameters
Expression<Func<T, IEnumerable<TChild>>> memberExpression

Collection property

MapBuilder<TKey, TValue> HasManyToMany<TKey, TValue>(Expression<Func<T, IDictionary<TKey, TValue>>> memberExpression)

Maps a generic dictionary
Parameters
Expression<Func<T, IDictionary<TKey, TValue>>> memberExpression

Collection property

OneToOnePart<TOther> HasOne<TOther>(Expression<Func<T, object>> memberExpression)

Create a reference to another entity based exclusively on the primary-key values. This is sometimes called a one-to-one relationship, in database terms. Generally you should use References<TOther> whenever possible.
Parameters
Expression<Func<T, object>> memberExpression

Property

PropertyBuilder Map(Expression<Func<T, object>> memberExpression, string columnName)

Create a property mapping.
Parameters
Expression<Func<T, object>> memberExpression

Property to map

string columnName

Property column name

PropertyBuilder Map(Expression<Func<T, object>> memberExpression)

Create a property mapping.
Parameters
Expression<Func<T, object>> memberExpression

Property to map

ManyToOneBuilder<TOther> References<TOther>(Expression<Func<T, TOther>> memberExpression)

Create a reference to another entity. In database terms, this is a many-to-one relationship.
Parameters
Expression<Func<T, TOther>> memberExpression

Property on the current entity

ManyToOneBuilder<TOther> References<TOther>(Expression<Func<T, TOther>> memberExpression, string columnName)

Create a reference to another entity. In database terms, this is a many-to-one relationship.
Parameters
Expression<Func<T, TOther>> memberExpression

Property on the current entity

string columnName

Column name

AnyPart<T> ReferencesAny<TOther>(Expression<Func<T, TOther>> memberExpression)

Create a reference to any other entity. This is an "any" polymorphic relationship.
Parameters
Expression<Func<T, TOther>> memberExpression

Property

StoredProcedurePart SqlDelete(string innerText)

Specify an delete stored procedure
Parameters
string innerText

Stored procedure call

StoredProcedurePart SqlDeleteAll(string innerText)

Specify an delete all stored procedure
Parameters
string innerText

Stored procedure call

StoredProcedurePart SqlInsert(string innerText)

Specify an insert stored procedure
Parameters
string innerText

Stored procedure call

StoredProcedurePart SqlUpdate(string innerText)

Specify an update stored procedure
Parameters
string innerText

Stored procedure call

Public properties

Type EntityType get;