Namespaces

Types in FluentNHibernate.Mapping

Type ClasslikeMapBase<T>

Namespace FluentNHibernate.Mapping

Methods

Properties

Public instance methods

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

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

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

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

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

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

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

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

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

Property to map

PropertyPart 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

ManyToOnePart<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

ManyToOnePart<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;