Well, it is quite simple. Try this:
Code:
internal YourTypedCollection GetAllTypedObjects()
{
//create new typed collection
YourTypedCollection collection = new YourTypedCollectionn();
try
{
//open session
ISession session = factory.OpenSession();
//define HQL statement for getting all activated bidders collection.AddRange(session.CreateCriteria(typeof(TypedObjectClass)).List());
//close session
session.Close();
}
catch(Exception ex)
{
Debug.WriteLine(ex.Message);
}
//return the filled collection
return collection;
}