You can make the DB call happen without caching every time you need a list,
and maybe display a short "in progress" kind of UI while this happens.
Just make sure this is really needed, as in, the list does really change
this frequently. Maybe you don't need to. Maybe you can go with just refresh
every X minutes or manual refresh button.

Anyway, this is all application concern. There is nothing NHibernate
specific here, think of it as another ADO.NET way. It just gets the data
from DB. You application is the one that decides when to go get this data
from DB.



*Mohamed Meligy
*Readify | Senior Developer

M:+61 451 835006 | W: readify.net
[image: Description: Description: Description: Description:
rss_16]<http://gurustop.net>
[image: Description: Description: Description: Description:
cid:[email protected]]
<http://www.linkedin.com/in/meligy>  [image:
Description: Description: Description: Description:
cid:[email protected]] <http://twitter.com/meligy>
 
<http://www.greatplacetowork.com.au/best/best-companies-australia.php><http://www.readify.net/AboutUs/NewsItem.aspx?id=10>



On Mon, Mar 21, 2011 at 9:44 AM, Fabio Maulo <[email protected]> wrote:

> The other workstation should shout "I HAVE INSERTED/UPDATED A CUSTOMER!!!!"
> and your workstation should listen the shout.
>
> On Sun, Mar 20, 2011 at 7:13 PM, Robert <[email protected]> wrote:
>
>> Hey there,
>>
>> I am new with NHibernate, and stuck on a little problem, so i hope you
>> can help me.
>>
>> To start with, i created a new class for example "Customer" and did
>> the NHibernate mapping stuff.
>> This works all well, Create a new object of this class and the
>> database is updated as it should be.
>>
>> And here starts my problem:  On startup of the software, a list with
>> all objects is created via
>>
>>        public IList<Customer> GetAllCustomers()
>>        {
>>            using (ISession session = NHibernateHelper.OpenSession())
>>            {
>>                ICriteria custCriteria =
>> session.CreateCriteria(typeof(Customer));
>>                IList<Customer>customerList =
>> custCriteria.List<Customer>();
>>
>>                return customerList;
>>            }
>>        }
>>
>>
>> But there are other workstations with this software too, who are
>> updating the database, so i have to keep this list updated all the
>> time. Any idead how to realize it?
>>
>> Kind regards
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "nhusers" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/nhusers?hl=en.
>>
>>
>
>
> --
> Fabio Maulo
>
>  --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to