Fluent NHibernate
Standard Mapping Conventions (changes)

Showing changes from revision #1 to #2: Added | Removed

As with the Auto Mapping, you can specify conventions to be used when your entities are pushed into NHibernate. I'll use the Fluent Configuration API to illustrate how to set these conventions.

Fluent.Configuration()
  .Database(SQLiteConfiguration.Standard.InMemory)
  .Mappings(m =>
    m.FluentMappings
      .AddFromAssemblyOf<Entity>>()
      .AlterConventions(convention.ConventionDiscovery.AddFromAssemblyOf<MyConvention>())
  .BuildSessionFactory();

You => { //can read more on conventions in here })) .BuildSessionFactory();

Thegeneral conventionson fromthe Auto Mapping Conventions all apply to standard mappings too, so it's easier to follow through that example and apply them here.page.