NHibernate query CreateCriteria
Posted
by Jacob
on Stack Overflow
See other posts from Stack Overflow
or by Jacob
Published on 2010-04-14T20:26:08Z
Indexed on
2010/04/14
21:03 UTC
Read the original article
Hit count: 402
Is it possible to chose what columns I want in return from Session.CreateCriteria() ?
egz.:
var x = session.CreateCriteria();
x.CreateAlias("EmployeePosition", "employeePosition");
x.Add(Restrictions.Eq("employeePosition.Name", "Developer"));
and is there a way to add something like "select LastName" to avoid downloading the whole row.
© Stack Overflow or respective owner