Namespaces

Types in FluentNHibernate.Automapping

Type AutoPersistenceModel

Namespace FluentNHibernate.Automapping

Parent PersistenceModel

Methods

Properties

Public instance methods

AutoPersistenceModel AddEntityAssembly(Assembly assembly)

Adds all entities from a specific assembly.
Parameters
Assembly assembly

Assembly to load from

AutoPersistenceModel AddTypeSource(ITypeSource source)

Adds all entities from the ITypeSource.
Parameters
ITypeSource source

ITypeSource to load from

AutoPersistenceModel Alterations(Action<AutoMappingAlterationCollection> alterationDelegate)

Specify alterations to be used with this AutoPersisteceModel
Parameters
Action<AutoMappingAlterationCollection> alterationDelegate

Lambda to declare alterations

Return
AutoPersistenceModel

AutoPersistenceModel

IMappingProvider FindMapping(Type type)

IMappingProvider FindMapping<T>()

AutoPersistenceModel IgnoreBase(Type baseType)

Ignore a base type. This removes it from any mapped inheritance hierarchies, good for non-abstract layer supertypes.
Parameters
Type baseType

Type to ignore

AutoPersistenceModel IgnoreBase<T>()

Ignore a base type. This removes it from any mapped inheritance hierarchies, good for non-abstract layer supertypes.

AutoPersistenceModel IncludeBase(Type baseType)

Explicitly includes a type to be used as part of a mapped inheritance hierarchy.
Abstract classes are probably what you'll be using this method with. Fluent NHibernate considers abstract classes to be layer supertypes, so doesn't automatically map them as part of an inheritance hierarchy. You can use this method to override that behavior for a specific type; otherwise you should consider using the AbstractClassIsLayerSupertype setting.
Parameters
Type baseType

Type to include

AutoPersistenceModel IncludeBase<T>()

Explicitly includes a type to be used as part of a mapped inheritance hierarchy.
Abstract classes are probably what you'll be using this method with. Fluent NHibernate considers abstract classes to be layer supertypes, so doesn't automatically map them as part of an inheritance hierarchy. You can use this method to override that behavior for a specific type; otherwise you should consider using the AbstractClassIsLayerSupertype setting.

AutoPersistenceModel Override<T>(Action<AutoMapping<T>> populateMap)

Override the mapping of a specific entity.
This may affect subclasses, depending on the alterations you do.
Parameters
Action<AutoMapping<T>> populateMap

Lambda performing alterations

AutoPersistenceModel OverrideAll(Action<IPropertyIgnorer> alteration)

Override all mappings.
Currently only supports ignoring properties on all entities.
Parameters
Action<IPropertyIgnorer> alteration

Lambda performing alterations

AutoPersistenceModel Setup(Action<AutoMappingExpressions> expressionsAction)

Alter some of the configuration options that control how the automapper works. Depreciated in favour of supplying your own IAutomappingConfiguration instance to AutoMap: AssemblyOf<T>. Cannot be used in combination with a user-defined configuration.

AutoPersistenceModel UseOverridesFromAssembly(Assembly assembly)

Use auto mapping overrides defined in the assembly of T.
Parameters
Assembly assembly

Assembly to scan

Return
AutoPersistenceModel

AutoPersistenceModel

AutoPersistenceModel UseOverridesFromAssemblyOf<T>()

Use auto mapping overrides defined in the assembly of T.
Return
AutoPersistenceModel

AutoPersistenceModel

AutoPersistenceModel Where(Func<Type, bool> where)

Supply a criteria for which types will be mapped. Cannot be used in combination with a user-defined configuration.
Parameters
Func<Type, bool> where

Where clause

Public properties

PairBiDirectionalManyToManySidesDelegate BiDirectionalManyToManyPairer get; set;

SetupConventionFinder<TReturn> Conventions get;

Alter convention discovery

bool MergeMappings get; set;

bool ValidationEnabled get; set;