Example #1
0
        /// <summary>
        /// Loads a <see cref="F01_ContinentColl"/> collection from the database.
        /// </summary>
        protected void DataPortal_Fetch()
        {
            var args = new DataPortalHookArgs();

            OnFetchPre(args);
            using (var dalManager = DalFactoryParentLoadROSoftDelete.GetManager())
            {
                var dal  = dalManager.GetProvider <IF01_ContinentCollDal>();
                var data = dal.Fetch();
                LoadCollection(data);
            }
            OnFetchPost(args);
        }
        /// <summary>
        /// Loads a <see cref="E02_Continent"/> object from the database, based on given criteria.
        /// </summary>
        /// <param name="continent_ID">The Continent ID.</param>
        protected void DataPortal_Fetch(int continent_ID)
        {
            var args = new DataPortalHookArgs(continent_ID);

            OnFetchPre(args);
            using (var dalManager = DalFactoryParentLoadROSoftDelete.GetManager())
            {
                var dal  = dalManager.GetProvider <IE02_ContinentDal>();
                var data = dal.Fetch(continent_ID);
                Fetch(data);
            }
            OnFetchPost(args);
            // check all object rules and property rules
            BusinessRules.CheckRules();
        }