Beispiel #1
0
        public static MyRoot GetRoot()
        {
            var myRoot = DataPortal.Fetch <MyRoot>(null);

            myRoot.BusinessRules.CheckRules();
            return(myRoot);
        }
Beispiel #2
0
 public static MyRoot GetRoot()
 {
     return(DataPortal.Fetch <MyRoot>(null));
 }
Beispiel #3
0
 public static CustomerList GetReadOnlyList(string filter)
 {
     return(DataPortal.Fetch <CustomerList>(filter));
 }
Beispiel #4
0
 internal static object Fetch(Type objectType, object criteria)
 {
     return(DataPortal <object> .Fetch(objectType, criteria));
 }
Beispiel #5
0
        /// <summary>
        /// Called by a factory method in a business class to retrieve
        /// an object, which is loaded with values from the database.
        /// </summary>
        /// <typeparam name="T">Specific type of the business object.</typeparam>
        /// <param name="criteria">Object-specific criteria.</param>
        /// <returns>An object populated with values from the database.</returns>
        public static T Fetch <T>(params object[] criteria)
        {
            var dp = new DataPortal <T>();

            return(dp.Fetch(criteria));
        }