hey Tuna, thanks for the answers.
actually, i think every tutorial and example with nhibernate i saw included
a repository.
but, when i think of it, i've seen like 10 different ways of implementing a
repository, when what i really look for is a single implementation.

 i know some are at the contribs and currently the one i liked the most is
from s#arp. what can you (or others) recommend for repository? what are the
best practices here?



On Sun, Apr 5, 2009 at 1:03 AM, Tuna Toksoz <[email protected]> wrote:

> static IRepository is nonsense, it should have been singleton IRepository
> injected to services via Containers.
>
> 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, Apr 5, 2009 at 12:22 AM, Tuna Toksoz <[email protected]> wrote:
>
>> I would use static IRepository, and use some sort of session manager (via
>> castle NH Facility or SessionEasier in uNhAddins). Repository would take
>> session manager from this manager.
>>
>>
>>
>> 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, Apr 5, 2009 at 12:20 AM, Dotan N. <[email protected]> wrote:
>>
>>> so lets say we use some query in mvc.net, i'm in the action method of a
>>> controller, and i've decided that session management would be by-action.
>>> somehow i need to make sure that the repository gets a new session. does
>>> that mean:
>>>
>>> create newsession
>>> var result  = new ObjectARepo(newsession).PerformQuery(..)
>>>
>>>
>>>
>>>
>>> On Sun, Apr 5, 2009 at 12:10 AM, Tuna Toksoz <[email protected]> wrote:
>>>
>>>> Even if I use Linq, I would put the stuff in Repository.
>>>>
>>>>
>>>> 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, Apr 5, 2009 at 12:08 AM, Dotan N. <[email protected]> wrote:
>>>>
>>>>> ve to create a method in my object X repository that builds a criteria
>>>>> and does that, right?
>>>>> in other words, every nontrivial fetching of data gets a method in the
>>>>> repository.. or must i use a repository at all?
>>>>>
>>>>> what do people usually do?
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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