c# - NHibernate When to Use lazy loading? -


all understand lazy loading loads when object needed , should use it. please explain me scenarios have use , not use it? in advance.

i put way:

lazy loading essence of orm. principle of orm. (unless want load complete db in 1 shot)

check article ayende:

nhibernate lazy, live it

small cite source:

...there reason why lazy set true default, , while sure there limited number of scenarios lazy=”false” appropriate choice, isn’t scenario...

from experience:

i hardly explain better post ayende. have confirm - see same way. never used non lazy setting. if should loaded in 1 shot - use projections:

  • let orm stuff lazy
  • adjust ad hoc queries needed

Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -