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

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -