Hi,
I'm new to nHibernate and have some questions to use it with .Net Winforms.
In my application I use
Code:
session.CreateCriteria
to query data which works good. But I use some DataGridView controls which do not always display all properties of the loaded class. If I bind the returned IList to the control I see all columns of the table.
Can I filter the column list as I can do it in SQL's Select statement?
If I use
Code:
session.createSQLQuery
there must be a object which contains the specified columns.
I use
Code:
column.visible =false
from datagrid which works so far and hides for example the id column. But is it possible to rename the columns. I have a database column "car" and want to replace it with some translated string. I don't see any way to do this with NHibernate, because I lose the object behind. In Sql I write "Select car as Auto from ...".
When the IList is bound to the control it is not possible to rename the columns any more. How can this be done without copying the IList to a new generated Datatable?
Thanks.