ok. i think my question was unclear. i prepared an example solution for being verbose. i try to write this query with criteria api. "select firstname,lastname from employees"
2009/9/8 olcay şeker <[email protected]> > > i used but nope. failed again. result is some properties from AR > classes like isreadonly,isfixedsize,longlength,rank etc... > > session.CreateCriteria(typeof(Employees)).SetProjection > (Projections.ProjectionList().Add(Projections.Property > ("Firstname")).Add(Projections.Property("Lastname"))).List(); > > On 8 Eylül, 05:30, Tuna Toksoz <[email protected]> wrote: > > use Projections.ProjectionList > > > > Tuna Toksöz > > Eternal sunshine of the open source mind. > > > > > http://devlicio.us/blogs/tuna_toksozhttp://tunatoksoz.comhttp://twitter.com/tehlike > > > > > > > > On Mon, Sep 7, 2009 at 10:22 PM, olcay şeker <[email protected]> > wrote: > > > > > how can i write this query "select firstname,lastname from employees > > > " with ICriteria api instead of hql? i tried with projection but > > > failed. > > > > > session.CreateCriteria(typeof(employees)).SetProjection > > > (Projections.Property("firstname")).SetProjection(Projections.Property > > > ("lastname")).List(); > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
CastleLearning.rar
Description: Binary data
