Hi,

Maybe this is the right place for this mail, maybe not : I try

I have 2 questions (and maybe 2 suggestions) in the
NHibernate.Linq.Query class:
- why does the Expand method return a IQueryable<T> and not a
INHibernateQueryable<T> ? Thus, the chain is broken when an Expand
method is used and it is not possible to chain 2 Expand.
- why does the Expand method take a string parameter instead of an
expression ? Expression are more fluent.

Suggestion:
We can add something like that in the Query class (ReflectionHelper is
from Fluent Nhibernate)
        public INHibernateQueryable<T> Expand(Expression<Func<T,
object>> expression)
        {
            PropertyInfo property = ReflectionHelper.GetProperty
(expression);
            queryOptions.AddExpansion(property.Name);
            return this;
        }

Hope it helps,
Jeff


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"NHibernate Contrib - Development Group" 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.ar/group/nhcdevs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to