/// <summary> /// Used to issue a Save command on an esEntity or esEntityCollection. /// </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 esDataResponse esSaveDataTable(esDataRequest request, esProviderSignature sig) { request.DatabaseVersion = sig.DatabaseVersion; esDataResponse response = esProviderFactory.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 // esEntityCollection.SaveToProviderInsertsUpdates after we assign the errors to the proper rows. return response; }
/// <summary> /// Used to issue a Save command on an esEntity or esEntityCollection. /// </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 esDataResponse esSaveDataTable(esDataRequest request, esProviderSignature sig) { request.DatabaseVersion = sig.DatabaseVersion; esDataResponse response = esProviderFactory.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 // esEntityCollection.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 esEntityCollection. /// </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 esDataResponse FillDataTable(esDataRequest request, esProviderSignature sig) { request.DatabaseVersion = sig.DatabaseVersion; esDataResponse response = esProviderFactory.GetDataProvider(sig.DataProviderName, sig.DataProviderClass).FillDataTable(request); if (response.IsException) { throw response.Exception; } return(response); }
/// <summary> /// Used to populate an esEntity or esEntityCollection 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 esDataResponse esLoadDataTable(esDataRequest request, esProviderSignature sig) { request.DatabaseVersion = sig.DatabaseVersion; esDataResponse response = esProviderFactory.GetDataProvider(sig.DataProviderName, sig.DataProviderClass).esLoadDataTable(request); if(request.DynamicQuery != null) { request.DynamicQuery.es.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 esDataResponse ExecuteNonQuery(esDataRequest request, esProviderSignature sig) { request.DatabaseVersion = sig.DatabaseVersion; esDataResponse response = esProviderFactory.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 esEntityCollection 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 esDataResponse esLoadDataTable(esDataRequest request, esProviderSignature sig) { request.DatabaseVersion = sig.DatabaseVersion; esDataResponse response = esProviderFactory.GetDataProvider(sig.DataProviderName, sig.DataProviderClass).esLoadDataTable(request); if (request.DynamicQuery != null) { request.DynamicQuery.es.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 esDataResponse ExecuteNonQuery(esDataRequest request, esProviderSignature sig) { request.DatabaseVersion = sig.DatabaseVersion; esDataResponse response = esProviderFactory.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 esEntityCollection. /// </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 esDataResponse FillDataTable(esDataRequest request, esProviderSignature sig) { request.DatabaseVersion = sig.DatabaseVersion; esDataResponse response = esProviderFactory.GetDataProvider(sig.DataProviderName, sig.DataProviderClass).FillDataTable(request); if (response.IsException) { throw response.Exception; } return response; }