hi sir/madam,
i'm using version 2.1.2 and new in nhibernate which just started to get hands on it with NHibernate books, i .have a doubts regards record fetching technique and session caching. from my understanding, i can read record with following technique and it will stored the entity into session cache.
1. Linq, IQueryable or IEnumerable 2. Session.Get,Session.Load,Session.Find,Session.List, Session.CreateQuery and Session.CreateCriteria
but at times i dont want to cache the entity for read only record and performance concern, how can i achieve by not to cache the entity when reading the record from database?
about the Session.CreateQuery, i noticed that if i call it multiple times for the same query and result, it will issued select SQL to database each time i call Session.CreateQuery, why didn't it retrieve record from cache after 1st read??
many thanks. regards
|