我已经映射.hmb.xml中的实体并为类中的所有实体定义属性。Nhibernate - 删除一些简单的HQL
我有一些基本的成就,并获得使用下面的代码的所有记录。
public List<DevelopmentStep> getDevelopmentSteps()
{
List<DevelopmentStep> developmentStep;
developmentStep = Repository.FindAll<DevelopmentStep>(new OrderBy("Id", Order.Asc));
return developmentStep;
}
我从网签,我们可以写HQL,现在的问题是如何执行这个HQL如..
string hql = "From DevelopmentSteps d inner join table2 t2 d.id=t2.Id where d.id=IDValue";
我需要什么额外的类或其他东西添加到执行此一种HQL?
请帮我----由于
获取会话是基本的NHibernate的,你不能没有会话做任何事情。看一下手册的第一章:“快速入门”,例如“与猫玩耍”:http://nhforge.org/doc/nh/en/index.html#quickstart-playingwithcats – 2010-04-19 07:38:47