The problem is that you would need some way of letting NH know that this is
a method that should run on the results, rather than transform them.The
first statement will generate
select id, bar from FooTbl
The second will generate
select * from FooTbl
And do the transform in memory, which might be expensive.
On Mon, Oct 20, 2008 at 11:24 PM, Tim Scott <[EMAIL PROTECTED]> wrote:
>
> Currently in NH.Linq we can do this:
>
> (from f in session.Linq<Foo>() select new FooDto { Id = f.Id, Bar =
> f.Bar }).ToList();
>
> Is it conceivable to extend NH.Linq to do the same thing like so?
>
> (from f in session.Linq<Foo>() select f.TransFormToDto()).ToList();
>
> That is...to factor out projection transform to a method (not
> necessarily on the Foo class). It seems this would have great DRYness
> value.
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---