Used by the tgConnection class. This returns the signature necessary to invoke a command on an EntitySpaces DataProvider. Returned by the "ProviderSignature" property on the tgConnection class.
示例#1
0
        /// <summary>
        /// Used to issue a Save command on an esEntity or tgEntityCollection.
        /// </summary>
        /// <param name="request">Contains all of the information necessary to issue and carry out the request</param>
        /// <param name="sig">Contains the required information to locate the EntitySpaces DataProvider</param>
        /// <returns></returns>
        public tgDataResponse esSaveDataTable(tgDataRequest request, tgProviderSignature sig)
        {
            request.DatabaseVersion = sig.DatabaseVersion;
            tgDataResponse response = tgProviderFactory.GetDataProvider(sig.DataProviderName, sig.DataProviderClass).esSaveDataTable(request);

            // NOTE: New to 1.6.0. We do not rethrow the exception here, we do rethrow it in
            // tgEntityCollection.SaveToProviderInsertsUpdates after we assign the errors to the proper rows.

            return response;
        }
示例#2
0
        /// <summary>
        /// Used to issue a Save command on an esEntity or tgEntityCollection.
        /// </summary>
        /// <param name="request">Contains all of the information necessary to issue and carry out the request</param>
        /// <param name="sig">Contains the required information to locate the EntitySpaces DataProvider</param>
        /// <returns></returns>
        public tgDataResponse esSaveDataTable(tgDataRequest request, tgProviderSignature sig)
        {
            request.DatabaseVersion = sig.DatabaseVersion;
            tgDataResponse response = tgProviderFactory.GetDataProvider(sig.DataProviderName, sig.DataProviderClass).esSaveDataTable(request);

            // NOTE: New to 1.6.0. We do not rethrow the exception here, we do rethrow it in
            // tgEntityCollection.SaveToProviderInsertsUpdates after we assign the errors to the proper rows.

            return(response);
        }
示例#3
0
        /// <summary>
        /// Similiar to esLoadDataTable only this method merely returns a DataTable and does not
        /// actually populate an esEntity or tgEntityCollection.
        /// </summary>
        /// <param name="request">Contains all of the information necessary to issue and carry out the request</param>
        /// <param name="sig">Contains the required information to locate the EntitySpaces DataProvider</param>
        /// <returns></returns>
        public tgDataResponse FillDataTable(tgDataRequest request, tgProviderSignature sig)
        {
            request.DatabaseVersion = sig.DatabaseVersion;
            tgDataResponse response = tgProviderFactory.GetDataProvider(sig.DataProviderName, sig.DataProviderClass).FillDataTable(request);

            if (response.IsException)
            {
                throw response.Exception;
            }

            return(response);
        }
示例#4
0
        /// <summary>
        /// Used to populate an esEntity or tgEntityCollection with data.
        /// </summary>
        /// <param name="request">Contains all of the information necessary to issue and carry out the request</param>
        /// <param name="sig">Contains the required information to locate the EntitySpaces DataProvider</param>
        /// <returns></returns>
        public tgDataResponse esLoadDataTable(tgDataRequest request, tgProviderSignature sig)
        {
            request.DatabaseVersion = sig.DatabaseVersion;
            tgDataResponse response = tgProviderFactory.GetDataProvider(sig.DataProviderName, sig.DataProviderClass).esLoadDataTable(request);
            if(request.DynamicQuery != null)
            {
                request.DynamicQuery.tg.LastQuery = response.LastQuery;
            }

            if (response.IsException)
            {
                throw response.Exception;
            }

            return response;
        }
示例#5
0
        /// <summary>
        /// Used to execute a non-data return query through the EntitySpaces DataProvider
        /// </summary>
        /// <param name="request">Contains all of the information necessary to issue and carry out the request</param>
        /// <param name="sig">Contains the required information to locate the EntitySpaces DataProvider</param>
        /// <returns></returns>
        public tgDataResponse ExecuteNonQuery(tgDataRequest request, tgProviderSignature sig)
        {
            request.DatabaseVersion = sig.DatabaseVersion;
            tgDataResponse response = tgProviderFactory.GetDataProvider(sig.DataProviderName, sig.DataProviderClass).ExecuteNonQuery(request);

            if (response.IsException)
            {
                throw response.Exception;
            }

            if (response.Parameters != null && response.Parameters.Count > 0)
            {
                request.Parameters.Merge(response.Parameters);
            }

            return(response);
        }
示例#6
0
        /// <summary>
        /// Used to populate an esEntity or tgEntityCollection with data.
        /// </summary>
        /// <param name="request">Contains all of the information necessary to issue and carry out the request</param>
        /// <param name="sig">Contains the required information to locate the EntitySpaces DataProvider</param>
        /// <returns></returns>
        public tgDataResponse esLoadDataTable(tgDataRequest request, tgProviderSignature sig)
        {
            request.DatabaseVersion = sig.DatabaseVersion;
            tgDataResponse response = tgProviderFactory.GetDataProvider(sig.DataProviderName, sig.DataProviderClass).esLoadDataTable(request);

            if (request.DynamicQuery != null)
            {
                request.DynamicQuery.tg.LastQuery = response.LastQuery;
            }

            if (response.IsException)
            {
                throw response.Exception;
            }

            return(response);
        }
示例#7
0
        /// <summary>
        /// Used to execute a non-data return query through the EntitySpaces DataProvider
        /// </summary>
        /// <param name="request">Contains all of the information necessary to issue and carry out the request</param>
        /// <param name="sig">Contains the required information to locate the EntitySpaces DataProvider</param>
        /// <returns></returns>
        public tgDataResponse ExecuteNonQuery(tgDataRequest request, tgProviderSignature sig)
        {
            request.DatabaseVersion = sig.DatabaseVersion;
            tgDataResponse response = tgProviderFactory.GetDataProvider(sig.DataProviderName, sig.DataProviderClass).ExecuteNonQuery(request);

            if (response.IsException)
            {
                throw response.Exception;
            }

            if (response.Parameters != null && response.Parameters.Count > 0)
            {
                request.Parameters.Merge(response.Parameters);
            }

            return response;
        }
示例#8
0
        /// <summary>
        /// Similiar to esLoadDataTable only this method merely returns a DataTable and does not 
        /// actually populate an esEntity or tgEntityCollection.
        /// </summary>
        /// <param name="request">Contains all of the information necessary to issue and carry out the request</param>
        /// <param name="sig">Contains the required information to locate the EntitySpaces DataProvider</param>
        /// <returns></returns>
        public tgDataResponse FillDataTable(tgDataRequest request, tgProviderSignature sig)
        {
            request.DatabaseVersion = sig.DatabaseVersion;
            tgDataResponse response = tgProviderFactory.GetDataProvider(sig.DataProviderName, sig.DataProviderClass).FillDataTable(request);

            if (response.IsException)
            {
                throw response.Exception;
            }

            return response;
        }