I've production code now, I can't change the way I'm following, I've to
solve the problem.

If it was EF the method is only the Include(Expression<Func<T,
TProperty>>), easier to wrap :).


On Tue, Aug 14, 2012 at 11:07 AM, Ramon Smits <[email protected]> wrote:

>
> ORM switching is a bad idea. Either invest in a technology to get the best
> performance or don't. You want to some how mix to the and that is the
> reason why I mention to use seperation of concern. This way you can put
> your query logic in an ORM independant technology with linq expressions and
> when performance is problematic you can add other implementations with
> technology specific optimizations without worrying about
> IRepository/NHibernate/ORM stuff at all in the class dependent on that
> implementations.
>
> Most optimizations are fetching all data at once by having efficient
> queries and minimizing roundtrips so I don't understand how abstracting
> your ORM helps with that.
>
>
> On Tue, Aug 14, 2012 at 10:42 AM, Matteo Migliore <
> [email protected]> wrote:
>
>> I'm working on a package that is used in production
>> http://nuget.org/packages/EyeSoft.Data.Nhibernate.
>>
>> The source is here http://hyperionsdk.codeplex.com.
>>
>> The package that uses all this things is
>> http://nuget.org/packages/EyeSoft.Domain.
>>
>> Here you can find an example of a domain and why I want to wrap all the
>> ISession
>> http://hyperionsdk.codeplex.com/SourceControl/changeset/view/78296#1759677
>> .
>>
>> Thanks if you can :),
>> Matteo.
>>
>>
>> On Tuesday, August 14, 2012 10:01:08 AM UTC+2, Ramon Smits wrote:
>>
>>>
>>> I think that you are on the wrong path here. I would not at all wrap the
>>> ISession as I don't see what kind of issue you are trying to resolve.
>>>
>>> IMHO it is better to wrap your query strategy in a seperate class in a
>>> seperation of concern kind of way. Then you can easily put optimizations in
>>> this class if needed and you can easily test this as well.
>>>
>>> On Mon, Aug 13, 2012 at 9:52 PM, Matteo Migliore 
>>> <[email protected]>wrote:
>>>
>>>>  Hi!
>>>>
>>>> I wrapped the ISession interface to an IRepository<T> (in a little more
>>>> complex way), now I've the problem to expose the eager loading feature
>>>> so I want to have this:
>>>> IRepository<T> : IEagerLoading<T>
>>>> ...
>>>>
>>>> IEagerLoading<T> : IQueryable<T>
>>>> {
>>>>     IEagerLoading<T> Include<TRelated>(Expression<**Func<T, TRelated>>
>>>> path);
>>>> }
>>>>
>>>> On the IRepository<T> I want to write customerRepository.Include(x =>
>>>> x.Addresses).Include(x => x.MainAddress);
>>>>
>>>> Do you know a simple way to do that?
>>>>
>>>> Thanks,
>>>> Matteo.
>>>>
>>>>  --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "nhusers" group.
>>>> To view this discussion on the web visit https://groups.google.com/d/**
>>>> msg/nhusers/-/030pE7I4fScJ<https://groups.google.com/d/msg/nhusers/-/030pE7I4fScJ>
>>>> .
>>>> To post to this group, send email to [email protected].
>>>> To unsubscribe from this group, send email to nhusers+u...@**
>>>> googlegroups.com.
>>>>
>>>> For more options, visit this group at http://groups.google.com/**
>>>> group/nhusers?hl=en <http://groups.google.com/group/nhusers?hl=en>.
>>>>
>>>
>>>
>>>
>>> --
>>> Ramon
>>>
>>>   --
>> You received this message because you are subscribed to the Google Groups
>> "nhusers" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/nhusers/-/y9Fk9kgfoIMJ.
>>
>> 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.
>>
>
>
>
> --
> Ramon
>
>  --
> 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.
>

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