I am new to my company and they use nHibernate. I have never used it before, and the person who knew it, left.
They use a lot of queries like below, which I understand, but seem quite inefficient in their implementation:
Dim Criteria As ICriteria = m_session.CreateCriteria(GetType(TableName))
Criteria.Add(Expression.Eq("Company", CompanyID))
CompanyThings = Criteria.List
How would I do something simple like the equivalent to "Select ID from Tablename" to only return a list of ID's rather than all possible related data? There are many partial snippets in the .chm files in c#, but they don't seem to be a complete example, nor am I familiar with c#.
Thanks, any help is greatly appreciated.
|