Nhibernate HQL example - paging and avoid sql injection

Refer to http://www.martinwilley.com/net/code/nhibernate/query.html#ToC3

E.g.Paging and avoid sql injection

IQuery q = s.CreateQuery("from Job as j where j.ServiceId in (:serviceIds)");
q
.SetParameterList("serviceIds", ids).SetFirstResult(10).SetMaxResults(10);

posted @ 2012-08-31 13:45  webglcn  阅读(179)  评论(0编辑  收藏  举报