/// <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; }
/// <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); }
/// <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); }
/// <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; }
/// <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); }
/// <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); }
/// <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; }
/// <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; }