I am using following query to select the data using Nhibernate.
var query = _session.GetNamedQuery("QueryNameFromHbmFile")
.SetInt32("Col1", userId)
.SetString("Col2", cropCode)
.SetString("Col3", geometry)
.SetString("Col4", startDate.ToString("dd-MM-yyyy"));
var resuls=query.SetResultTransformerFor<ModelClass>().List<ModelClass>().
Here all the data is loading in one call. I want to use Lazy loading here so that i can iterate over the data row by row. As it is also taking lot of time to transform the data to particular model type if it has lot of rows.
Is there any way to iterate row by row before loading complete data.?
Please Help.
Thanks in Advance!
What I have tried:
I am using following query to select the data using Nhibernate.
var query = _session.GetNamedQuery("QueryNameFromHbmFile")
.SetInt32("Col1", userId)
.SetString("Col2", cropCode)
.SetString("Col3", geometry)
.SetString("Col4", startDate.ToString("dd-MM-yyyy"));
var resuls=query.SetResultTransformerFor<modelclass>().List<modelclass>().
Here all the data is loading in one call. I want to use Lazy loading here so that i can iterate over the data row by row. As it is also taking lot of time to transform the data to particular model type if it has lot of rows.
Is there any way to iterate row by row before loading complete data.?
Please Help.