public CustomerDemographicCollection FetchAll()
 {
     CustomerDemographicCollection coll = new CustomerDemographicCollection();
     Query qry = new Query(CustomerDemographic.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
        public static CustomerDemographicCollection ToDtoCollection(this EntityCollection <CustomerDemographicEntity> entities)
        {
            OnBeforeEntityCollectionToDtoCollection(entities);
            var seenObjects = new Hashtable();
            var collection  = new CustomerDemographicCollection();

            foreach (var entity in entities)
            {
                collection.Add(entity.ToDto(seenObjects, new Hashtable()));
            }
            OnAfterEntityCollectionToDtoCollection(entities, collection);
            return(collection);
        }
 static partial void OnAfterEntityCollectionToDtoCollection(EntityCollection <CustomerDemographicEntity> entities, CustomerDemographicCollection dtos);
 public CustomerDemographicCollection FetchByQuery(Query qry)
 {
     CustomerDemographicCollection coll = new CustomerDemographicCollection();
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
 public CustomerDemographicCollection FetchByID(object CustomerTypeID)
 {
     CustomerDemographicCollection coll = new CustomerDemographicCollection().Where("CustomerTypeID", CustomerTypeID).Load();
     return coll;
 }