Aar*_*her 21

Fluently.Configure()
.Database(
       SQLiteConfiguration.Standard
       .InMemory)
       .Mappings( m => m.AutoMappings
           .Add( AutoMap.AssemblyOf<_Field>() ) )
       .Conventions
           .Add( FluentNHibernate.Conventions.Helpers.DefaultLazy.Never() )
       .BuildSessionFactory();
Run Code Online (Sandbox Code Playgroud)

  • 除非我弄错了,这里有8个左撇子,还有7个右撇子. (3认同)

Dar*_*rov 14

您可以尝试:

Not.LazyLoad();
Run Code Online (Sandbox Code Playgroud)

在您的映射构造函数中.


l3d*_*3dx 5

像这样:

References(x => x.Something).Not.LazyLoad();
Run Code Online (Sandbox Code Playgroud)