I understand that the List() method returns an IList of Object[]. How can I easly bind this to a drop down list data source?
Code:
ISQLQuery query;
string sql = "SELECT t.* " +
"FROM CompanyTheme ct, Theme t " +
"WHERE ct.ThemeID = t.ThemeID AND ct.CompanyID = :companyID";
query = Session.CreateSQLQuery(sql)
.AddScalar("ThemeID", NHibernateUtil.Int32)
.AddScalar("Name", NHibernateUtil.String)
.AddScalar("Folder", NHibernateUtil.String);
IList results = query.SetInt32("companyID", companyID).List();
ddl.DataTextField = ;
ddl.DataValueField = ;
ddl.DataSource = results;
Thanks!