A few years ago I was a strong proponent of using ActiveRecordMediator
and even played with NHibernate directly. My last experiences however
led me back to use the ActiveRecord pattern extensively as it is
really simple to use and to understand and all the code is in one
place.

Without repositories, only testing a little bit awkward. There are two
ways: Use InMemoryTesting with test data or - a new feature in
planning currently - an internal DAO layer that can be replaced with
mocks.

For session management, please see the pages I have linked in my first mail.

-Markus

2010/2/11 Blair <[email protected]>:
> I want the service to call the repositories and the service layer to
> flatten the dto's so i need to use the same session accross many
> repositories.
>
>
> On Feb 10, 4:18 pm, Markus Zywitza <[email protected]> wrote:
>> If you are using a repository layer that uses an ISession to create
>> flattened DTOs, you can use any suitible NHibernate session management
>> technique. I would in that case ditch AR altogether and use FluentNH
>> for mapping.
>>
>> -Markus
>>
>> 2010/2/10 Blair <[email protected]>:
>>
>>
>>
>> > Why cant i use an i session source and provide it to the service layer
>> > and repository layers and return flattened dto's to the ui.
>> > I can use castle to inject and save a session on thread static.
>>
>> > Is there anything wrong with this approach?
>>
>> > On Feb 10, 3:37 pm, Markus Zywitza <[email protected]> wrote:
>> >> Trunk has a brand-new feature called IConversation for session
>> >> management in GUIs.
>>
>> >> Docs:http://using.castleproject.org/display/AR/Using+the+Conversation+Pattern
>>
>> >> -Markus
>>
>> >> 2010/2/10 Blair <[email protected]>:
>>
>> >> > Hi I would like to know how best to use Active Record with a
>> >> > Repository Pattern on a Windows Forms application.
>> >> > I know that if you are using Web Forms with NHibernate you can flush
>> >> > the session and the end of the web request.
>>
>> >> > Is there anything that is required for Windows Forms to manage
>> >> > sessions or does active record take care of this?
>>
>> >> > Blair
>>
>> >> > --
>> >> > You received this message because you are subscribed to the Google 
>> >> > Groups "Castle Project Users" 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 
>> >> > athttp://groups.google.com/group/castle-project-users?hl=en.-Hide 
>> >> > quoted text -
>>
>> >> - Show quoted text -
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "Castle Project Users" 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 
>> > athttp://groups.google.com/group/castle-project-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Castle Project Users" 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/castle-project-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" 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/castle-project-users?hl=en.

Reply via email to