Пример #1
0
        /// <summary>
        /// Update a business object.
        /// </summary>
        /// <param name="obj">Business object to update.</param>
        /// <param name="context">
        /// <see cref="DataPortalContext" /> object passed to the server.
        /// </param>
        public DataPortalResult Update(object obj, DataPortalContext context)
        {
            try
            {
                SetContext(context);

                var portal = new FinalDataPortal();
                var result = portal.Update(obj, context);

                return(result);
            }
            finally
            {
                ClearContext(context);
            }
        }
Пример #2
0
        /// <summary>
        /// Update a business object.
        /// </summary>
        /// <param name="obj">Business object to update.</param>
        /// <param name="context">
        /// <see cref="DataPortalContext" /> object passed to the server.
        /// </param>
        public DataPortalResult Update(object obj, DataPortalContext context)
        {
            try
            {
                SetContext(context);

                var portal = new FinalDataPortal();
                var result = portal.Update(obj, context);

                return result;
            }
            finally
            {
                ClearContext(context);
            }
        }
Пример #3
0
        /// <summary>
        /// Get an existing business object.
        /// </summary>
        /// <param name="objectType">Type of business object to retrieve.</param>
        /// <param name="criteria">Criteria object describing business object.</param>
        /// <param name="context"><see cref="DataPortalContext" /> object passed to the server.</param>
        /// <returns></returns>
        public DataPortalResult Fetch(Type objectType, object criteria, DataPortalContext context)
        {
            try
            {
                SetContext(context);

                var portal = new FinalDataPortal();
                var result = portal.Fetch(objectType, criteria, context);

                return(result);
            }
            finally
            {
                ClearContext(context);
            }
        }
Пример #4
0
        /// <summary>
        /// Get an existing business object.
        /// </summary>
        /// <param name="objectType">Type of business object to retrieve.</param>
        /// <param name="criteria">Criteria object describing business object.</param>
        /// <param name="context"><see cref="DataPortalContext" /> object passed to the server.</param>
        /// <returns></returns>
        public DataPortalResult Fetch(Type objectType, object criteria, DataPortalContext context)
        {
            try
            {
                SetContext(context);

                var portal = new FinalDataPortal();
                var result = portal.Fetch(objectType, criteria, context);

                return result;
            }
            finally
            {
                ClearContext(context);
            }
        }