[nhusers] Re: How to handle Session in WinForm project?

2009-08-31 Thread ChrisHolmes
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;

[nhusers] Re: How to handle Session in WinForm project?

2009-08-31 Thread Fabio Maulo
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-28 Thread ChrisHolmes
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-28 Thread Fabio Maulo
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-25 Thread Fabio Maulo
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-25 Thread Jim Tanner
@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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-24 Thread ChrisHolmes
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-24 Thread Fabio Maulo
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-24 Thread Stefan Nobis
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-24 Thread ChrisHolmes
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-24 Thread José Romaniello
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Stefan Nobis
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Fabio Maulo
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Fabio Maulo
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Jim Tanner
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Tuna Toksoz
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread ChrisHolmes
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread ChrisHolmes
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread ChrisHolmes
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Carlos cubas
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Fabio Maulo
: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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Jim Tanner
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Tuna Toksoz
. 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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Belvasis
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Fabio Maulo
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Belvasis
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Fabio Maulo
, 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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Belvasis
. 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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Fabio Maulo
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread ChrisHolmes
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;

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread Wojciech Wieronski
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread ChrisHolmes
? 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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-23 Thread ChrisHolmes
@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,

[nhusers] Re: How to handle Session in WinForm project?

2009-08-22 Thread Fabio Maulo
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-22 Thread Raul Carlomagno
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-22 Thread Fabio Maulo
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-22 Thread ChrisHolmes
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-22 Thread José Romaniello
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-22 Thread ChrisHolmes
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-22 Thread José Romaniello
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-22 Thread José Romaniello
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

[nhusers] Re: How to handle Session in WinForm project?

2009-08-22 Thread Belvasis
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