Select partial data from a DB table using nhibernate -
I have a complex unit, very heavy I want to choose the name of this unit only with ID and DB for better performance. I am How can I do with Nibirnet (or fluent Nibernate)?
You have 2 options:
- While using ICriteria - Use (syntax may not be perfect but you get the picture)
set projection (projection. projection list. add (projection. property ( "prop")). (projection. property ( "Prop 1")))
When using the hql
c.Col1, c.col2, select from table c
A list of both array lists and - or something like that - you have to cross it and create your own dictionary (or whatever you have).
Comments
Post a Comment