I am new to Nhibernate. I want to retrieve collection of records against an entity. For example to retrieve a single record I have used the following statement:
resultObject=session.Get(id);
This above statement would retrieve a single record bas开发者_如何学编程ed on the 'id" I provide.
But I want to retrieve multiple rows from a table the way we retrieve from the following sql statement: Select * from Student
How can I do this using Nhibernate? Please guide?
Using Criteria API
ICriteria criteria = session.CreateCriteria(typeof(Student));
criteria.List<Student>();
Using HQL
IQuery nhQuery = session.CreateQuery("FROM Student");
nhQuery.List<Student>()
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论