How use QueryOver on NHibernate to select custom result -
i have code return colors have text:
public ienumerable<color> findstartingwith(string term) { return session.queryover<color>().where(color => color.name.islike(text, matchmode.anywhere)).list(); }
but want do, return string ienumerable containing list of color.name...
how can queryover?
thanks
junio
syntax may not right should somethign like:
public ienumerable<string> findstartingwith(string term) { return session.queryover<color>() .select(color => color.name) .where(color => color.name.islike(text, matchmode.anywhere)) .list<string>(); }
Comments
Post a Comment