fluent nhibernate r1.0 fluent mapping disable lazy load
-
05-07-2019 - |
Question
how to disable lazy loading in fn r1.0?
Solution
Fluently.Configure()
.Database(
SQLiteConfiguration.Standard
.InMemory)
.Mappings( m => m.AutoMappings
.Add( AutoMap.AssemblyOf<_Field>() ) )
.Conventions
.Add( FluentNHibernate.Conventions.Helpers.DefaultLazy.Never() )
.BuildSessionFactory();
OTHER TIPS
You can try with:
Not.LazyLoad();
inside your mapping constructor.
Like this:
References(x => x.Something).Not.LazyLoad();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow