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);

你可能感兴趣的:(Hibernate)