What would be the best practice for managing transactions Fabio?
Initially, I had my Repositories handling their own transactions. Like
so:
*
public class DeviceRepository : IRepositoryDevice
{
private IDataSource _db;
the answer is too long.you will discover it by your self when you will need
two save in the same transaction or/and when you will have 2 opened forms
needing 2 different business transactions.
2009/8/31 ChrisHolmes cb.hol...@gmail.com
What would be the best practice for managing transactions
Follow up, in case anyone else stumbles on this thread:
I managed to get something simple working and am fairly happy with the
result, but would like to vet the idea against the community to make
sure I'm not doing something horribly wrong.
What I ended up doing was writing an IUnitOfWork
And he need to manage transactions too...I hoping he don't want begin
a transaction at UoW start.
After that I would see the code where the UoW is used...
2009/8/28 Germán Schuager gschua...@gmail.com
I like that approach too.
One thing to keep in mind is that if your application allows
2009/8/25 Jim Tanner dobr...@gmail.com
@Fabio
Even if your articles are very clear and the samples in nhaddins are
very good, reading them was not enough for me to understand them.
And it took me a lots of efforts to understand where is the CpBt in
the samples.
Really thanks for this
@Stefan
http://www.codeproject.com/KB/cs/NHibernateLazyInitializer.aspx
A much better approach would be to tailor your HQLs (or
criteria queries) to each use case and select exactly the data you
need to touch explicitly
Yeah i m also convinced that loading stricly not any more column or
row than
Wojciech,
Thank you sir. This is incredibly helpful. I had no idea this
capability for contextual sessions existed in NHibernate. I believe
this is going to help me tremendously.
Awesome post Wojciech.
-Chris
On Aug 23, 7:23 pm, Wojciech Wieronski wojciech.wieron...@gmail.com
wrote:
Chris I
2009/8/24 ChrisHolmes cb.hol...@gmail.com
This is incredibly helpful. I had no idea this
capability for contextual sessions existed in NHibernate.
And this mean you haven't read all previous mails and links.
--
Fabio Maulo
--~--~-~--~~~---~--~~
You
Jim Tanner dobr...@gmail.com writes:
@Every one who might be interrested : This article deals with a way to
handle lazy loading in winforms.
http://www.codeproject.com/KB/cs/NHibernateLazyInitializer.aspx
I don't think this is a good idea, because it may lead to quite bad
performance. A much
And how exactly is that attitude helping me?
Everyone has been pretty kind here - except you.
-Chris
On Aug 24, 8:55 am, Fabio Maulo fabioma...@gmail.com wrote:
2009/8/24 ChrisHolmes cb.hol...@gmail.com
This is incredibly helpful. I had no idea this
capability for contextual sessions
The attitude that will help you is the* reader attitude*. No one
has enough time to write something twice.
You should be reading the former links and then answer concrete questions.
You say that you don't have enough time to execute the samples and configure
it. But you have enough time to
ChrisHolmes cb.hol...@gmail.com writes:
I have yet to see anyone explain this clearly.
Ok, I'll try to give at least some guideline.
First of all: The most important thing to remember is that an ISession
is really unstable and unreliable (according to the book 'Exceptional
C++' of Herb Sutter
That impl. allow what you are describing.A winForm, for use, should work
using MVP.
The P (or its variation VM for example) may work with its M or may share an
M from a parent usecase.
The M does not know if the persistence is implemented using NH or ADO.NET as
the DAO/Repository impl. does not
Belvasis, have you post an example some where ?If you want post your
examples in NH-Forge let me know.
Thanks.
2009/8/22 Belvasis belvasis...@googlemail.com
Hm, I think the first part of the blog describes the how and why of the
pattern well enough
I am also interested in the subject.
Is there any MVP or MVVM open source framework that can handle
winforms ?
On 23 août, 15:36, Fabio Maulo fabioma...@gmail.com wrote:
Belvasis, have you post an example some where ?If you want post your
examples in NH-Forge let me know.
Thanks.
2009/8/22
Caliburn?
Tuna Toksöz
Eternal sunshine of the open source mind.
http://devlicio.us/blogs/tuna_toksoz
http://tunatoksoz.com
http://twitter.com/tehlike
On Sun, Aug 23, 2009 at 6:36 PM, Jim Tanner dobr...@gmail.com wrote:
I am also interested in the subject.
Is there any MVP or MVVM open
Blevasis,
This is a great explanation of the way you're doing it. But again, I
don't understand it. Specifically, I don't understand the details of
how it is implemented.
Example: The Calling Context and the Persistence Context. You say:
Every
usecase may instantiate it's own
On Aug 22, 5:32 pm, José Romaniello jfromanie...@gmail.com wrote:
2009/8/22 ChrisHolmes cb.hol...@gmail.com
Why don't make any sense to you?
Implementation. How things get wired together. Who calls who. How do
dependencies get resolved. What does an actual unit of work look like
in code
If you are all new to this, don't try to invent everything from
scratch in your first application. Either use the patterns and
libraries already mentioned or, if you want to really understand and
develop everything yourself, start simple.
Yes! Because understanding is the most important
to
figure it out. It can't be that hard can it?
-Carlos
Practice makes perfect, but if no one is perfect, why practice?
Date: Sun, 23 Aug 2009 08:50:34 -0700
Subject: [nhusers] Re: How to handle Session in WinForm project?
From: cb.hol...@gmail.com
To: nhusers@googlegroups.com
:50:34 -0700
Subject: [nhusers] Re: How to handle Session in WinForm project?
From: cb.hol...@gmail.com
To: nhusers@googlegroups.com
If you are all new to this, don't try to invent everything from
scratch in your first application. Either use the patterns and
libraries
was in the same boat as you some time ago. And managed to
figure it out. It can't be that hard can it?
-Carlos
Practice makes perfect, but if no one is perfect, why practice?
Date: Sun, 23 Aug 2009 08:50:34 -0700
Subject: [nhusers] Re: How to handle Session in WinForm project?
From: cb.hol
. And managed to
figure it out. It can't be that hard can it?
-Carlos
Practice makes perfect, but if no one is perfect, why practice?
Date: Sun, 23 Aug 2009 08:50:34 -0700
Subject: [nhusers] Re: How to handle Session in WinForm project?
From: cb.hol...@gmail.com
To: nhusers
was in the same boat as you some time ago. And managed to
figure it out. It can't be that hard can it?
-Carlos
Practice makes perfect, but if no one is perfect, why practice?
Date: Sun, 23 Aug 2009 08:50:34 -0700
Subject: [nhusers] Re: How to handle Session in WinForm project?
From
some time ago. And managed
to figure it out. It can't be that hard can it?
-Carlos
Practice makes perfect, but if no one is perfect, why practice?
Date: Sun, 23 Aug 2009 08:50:34 -0700
Subject: [nhusers] Re: How to handle Session in WinForm project?
From: cb.hol...@gmail.com
2009 08:50:34 -0700
Subject: [nhusers] Re: How to handle Session in WinForm project?
From: cb.hol...@gmail.com
To: nhusers@googlegroups.com
If you are all new to this, don't try to invent everything from
scratch in your first application. Either use the patterns and
libraries
, why practice?
Date: Sun, 23 Aug 2009 08:50:34 -0700
Subject: [nhusers] Re: How to handle Session in WinForm project?
From: cb.hol...@gmail.com
To: nhusers@googlegroups.com
If you are all new to this, don't try to invent everything from
scratch in your first application
. And
managed to figure it out. It can't be that hard can it?
-Carlos
Practice makes perfect, but if no one is perfect, why practice?
Date: Sun, 23 Aug 2009 08:50:34 -0700
Subject: [nhusers] Re: How to handle Session in WinForm project?
From: cb.hol...@gmail.com
To: nhusers
was in the same boat as you some time ago. And
managed to figure it out. It can't be that hard can it?
-Carlos
Practice makes perfect, but if no one is perfect, why practice?
Date: Sun, 23 Aug 2009 08:50:34 -0700
Subject: [nhusers] Re: How to handle Session in WinForm project?
From
Again, you should really take a close look at the unhaddins impl, run the
samples, etc. I was in the same boat as you some time ago. And managed to
figure it out. It can't be that hard can it?
I am definitely going to take a look at the implementation. It's just
time consuming;
Chris I feel your pain. I had the same issues when starting with NH
and a winform app. Here is my experience. Hope it helps.
A simple Repo.
public class HealthcareProfessionalRepository :
IHealthcareProfessionalRepository
{
ISessionFactory _sessionFactory;
public
?
Date: Sun, 23 Aug 2009 08:50:34 -0700
Subject: [nhusers] Re: How to handle Session in WinForm project?
From: cb.hol...@gmail.com
To: nhusers@googlegroups.com
If you are all new to this, don't try to invent everything from
scratch in your first application. Either use
@ChrisHolmes and Belvasis : Are you writting / have you written a
winform nh framework from scratch or can u point me to an existing
framework ?
I am in the process of evaluating potential ways to use NHibernate in
a WinForm application. I haven't written anything yet, just been
thinking,
http://fabiomaulo.blogspot.com/2009/01/aspect-conversation-per.htmlhttp://fabiomaulo.blogspot.com/2009/01/aspect-conversation-per.htmlStart
from the first of the serie
Example
http://code.google.com/p/unhaddins/source/browse/#svn/trunk/Examples/uNHAddins.Examples.SessionManagement
2009/8/22
you can try castle activerecord too, it abstracts a little NH Sesion
artifact
On Aug 22, 1:25 pm, ChrisHolmes cb.hol...@gmail.com wrote:
Hey gang,
I'm trying to figure out the best way to handle the NHibernate session
in a WinForm scenario. I've Googled this to death and I still can't
find
2009/8/22 Raul Carlomagno rcarloma...@gmail.com
you can try castle activerecord too, it abstracts a little NH Sesion
artifact
sure.
--
Fabio Maulo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
nhusers
I've looked at this blog post before I posted to this message group,
and it just doesn't make any sense to me. I don't see how to use it in
an actual application scenario. I can't tell if there are multiple
sessions, or just one session for the entire application?
What is a recommended approach
2009/8/22 ChrisHolmes cb.hol...@gmail.com
I've looked at this blog post before I posted to this message group,
and it just doesn't make any sense to me. I don't see how to use it in
an actual application scenario. I can't tell if there are multiple
sessions, or just one session for the
I am not interested in Castle ActiveRecord.
I'm interested in actually learning how to accomplish my goals. I'll
write my own bits to accomplish my tasks, but I need to understand how
and why things work, and how they should be done.
I don't have an understanding of HOW to actually manage the
I'm working on a WPF example, but this post could help you too:
http://nhforge.org/blogs/nhibernate/archive/2009/08/15/nhibernate-and-wpf-models-concept.aspx
http://jfromaniello.blogspot.com/2009/08/chinook-media-manager-models-concept.html
2009/8/22 José Romaniello jfromanie...@gmail.com
You call theoretical stuff to a working example:
Fabio Maulo says:
Example
http://code.google.com/p/unhaddins/source/browse/#svn/trunk/Examples/uNHAddins.Examples.SessionManagement
Fabio's post are full of samples too.
Are you looking for a more personal explanation?
2009/8/22 ChrisHolmes
Hm, I think the first part of the blog describes the how and why of the
pattern well enough
http://fabiomaulo.blogspot.com/2008/12/conversation-per-business-transaction.html
But I think, it will not fit in every scenario of a winform application or
maybe I didn't understand all of it :-).
The
42 matches
Mail list logo