Hi all,
I am using Castle AR in a WinForms application. I made a quick switch
from Linq to Sql to AR near the end of a project, and didn't have the
time to properly learn AR/NHibernate before I started using it.
So, be gentle, this may be a really stupid question...
Several users run the
This may be harsh, but your first mistake was blindly applying a
framework to a project which is almost complete.
I made a quick switch from Linq to Sql to AR near the end of a project, and
didn't have the time to properly learn AR/NHibernate before I started using it.
As for advice on what the
You have a few possibilities:
1) If you are not using lazy loading, a WinForms application works
well without SessionScopes. This opens a session per operation with
instant refreshes per read.
2) If you are using large amounts of data, you will need lazy loading
and session scopes. In this
Hi Jason,
Thank you for your reply. That is not harsh at all. I am well aware of
the mistake I made. I was so frustrated with linq, that
I just had to drop it and quickly replace it with something else. Even
without any previous experience with NHibernate/AR,
it seemed far more intuitive and
I know what you mean when you talk about confusion. There is not
much real information out there about session management in windows
forms applications. I by now use a Session per use case and/or
a Session per form and it works good. Sure it has a little overhead
since you have to re - Get an
To: castle-project-users@googlegroups.com
Subject: Re: Castle AR, getting data from DB, not the cache
Hi Jason,
Thank you for your reply. That is not harsh at all. I am well aware of the
mistake I made. I was so frustrated with linq, that I just had to drop it
and quickly replace it with something
you definately don't want 1 session per application. 1 session factory
yes.
the main problems most encounter with NH/AR is
select n+1
and too many db writes
select n+1 can be avoided by using fetchmodes (eager, select, etc)
db writes can be reduced (depending on pk type) by use ado.net batch