Beginner |
 |
Joined: Sun Oct 22, 2006 12:06 pm Posts: 39
|
Hi!
Some times I'd like to draw the form or another items in application without waiting a nhibernate executing a query.
So how about this feature for a IQuery interface
IQuery q=sess.GetQuery("bla bla");
q.DataLoadCompleted+=new NHDataLoadHandler;
q.LoadAsync();
public void NHDataLoadHandler(object sender, DataEvent e)
{
bindingSource.Datasource=data.Result;
}
This would do a separate background request for the data and the ui does not have to wait for data loading, instead it will be populated when data is loaded.
Maybe the IQuery shouldn't do this job instead introduce a new interface for this
IQueryAsync
Any thoughts?
|
|