Created
September 8, 2009 20:32
-
-
Save orjan/183204 to your computer and use it in GitHub Desktop.
NH fluent configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ISessionFactory sessionFactory = Fluently.Configure() | |
.Database(SQLiteConfiguration.Standard.InMemory) | |
.Mappings(m => m.AutoMappings.Add( | |
AutoMap.AssemblyOf<Entity>() | |
//.IncludeBase<Entity>() | |
.Where(t => t.Namespace.EndsWith("Domain")) | |
.IgnoreBase<Entity>() | |
//.Conventions.Add<MyStringLengthConvention>() | |
.Conventions.Add<MyIdConvention>() | |
)) | |
.ExposeConfiguration(BuildSchema) | |
.BuildSessionFactory(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment