Check out 
http://ayende.com/Blog/archive/2009/04/30/nhibernate-ndash-the-difference-between-get-load-and-querying-by.aspx
for some tips on how to speed up this particular query,

On Oct 21, 11:13 pm, aemami <[email protected]> wrote:
> Here is an example of a query that performs poorly compared to a
> competing vendor's product:
>
>         public IEnumerable<User> SearchByUserId(int userId)
>         {
>             return session.Linq<User>().Where(user => user.Id ==
> userId);
>         }
>
> This is a very straightforward query.
>
> And in response to Fabio - why would I want to write this in an OOP
> manner, when the functional approach is clear, concise, easy to read,
> and substantially easier to modify/maintain?
>
> On Oct 20, 6:27 am, Fabio Maulo <[email protected]> wrote:
>
>
>
> > 2009/10/19 aemami <[email protected]>
>
> > > You guys really should focus on LINQ.  Most people don't want to use
> > > the Criteria api or HQL.  That is NHibernate-specific technology,
> > > which is silly to learn when you could be learning a mutli-use .NET
> > > technology such as LINQ.
>
> > WELCOME in ObjectOriented world!!!
>
> > We are focused in Object Oriented queries since .NET1.1. Have you learned
> > about it only since .NET3.5 ?
>
> > --
> > Fabio Maulo- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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