private static void CheckISqlServerExecutionContext(ISqlServerExecutionContext executionContext) { if (executionContext == null) { throw new ArgumentNullException("executionContext"); } }
public static DataSet GetDataSetWithStoredProcedure(ISqlServerExecutionContext executionContext, string procedureName, params SqlParameter[] parameters) { CheckISqlServerExecutionContext(executionContext); DataSet dataSet = new DataSet(); dataSet.Locale = CultureInfo.CurrentCulture; executionContext.FillDataSetWithStoredProcedure(dataSet, procedureName, parameters); return(dataSet); }
public static DataSet GetDataSetWithSqlCommand(ISqlServerExecutionContext executionContext, SqlCommand command) { CheckISqlServerExecutionContext(executionContext); DataSet dataSet = new DataSet(); dataSet.Locale = CultureInfo.CurrentCulture; executionContext.FillDataSetWithSqlCommand(dataSet, command); return(dataSet); }
public static DataTable GetDataTableWithText(ISqlServerExecutionContext executionContext, string text, params SqlParameter[] parameters) { CheckISqlServerExecutionContext(executionContext); DataTable dataTable = new DataTable(); dataTable.Locale = CultureInfo.CurrentCulture; executionContext.FillDataTableWithText(dataTable, text, parameters); return(dataTable); }
public static DataTable GetDataTableWithSqlCommand(ISqlServerExecutionContext executionContext, SqlCommand command) { CheckISqlServerExecutionContext(executionContext); DataTable dataTable = new DataTable(); dataTable.Locale = CultureInfo.CurrentCulture; executionContext.FillDataTableWithSqlCommand(dataTable, command); return(dataTable); }