Base solution for your next web application
Open Closed

Repository IQueryable and Session.QueryOver #295


User avatar
0
nobruds created

Hello

I have a doubt, I think its related more about best practices or concepts.

On your samples I see that on Repository classes you use IQueryable<T>, so you can query over it. I am using "Session.QueryOver<T>()", that uses criteria right ?

Whats the best practice to use with your framework? the performance difference is little ?

Thanks for the help.


2 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    These are APIs of NHibernate. It has 3 different API to quesy data (the last one is HQL). It's your choice. Why I have chosen IQueryable? Because it's ORM independent and proper to add to IRepository interface :)

  • User Avatar
    0
    nobruds created

    Ohh ok, thanks for the reply. :)