示例#1
0
 private static void CheckISqlServerExecutionContext(ISqlServerExecutionContext executionContext)
 {
     if (executionContext == null)
     {
         throw new ArgumentNullException("executionContext");
     }
 }
示例#2
0
        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);
        }
示例#3
0
        public static DataSet GetDataSetWithSqlCommand(ISqlServerExecutionContext executionContext, SqlCommand command)
        {
            CheckISqlServerExecutionContext(executionContext);
            DataSet dataSet = new DataSet();

            dataSet.Locale = CultureInfo.CurrentCulture;
            executionContext.FillDataSetWithSqlCommand(dataSet, command);
            return(dataSet);
        }
示例#4
0
        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);
        }
示例#5
0
        public static DataTable GetDataTableWithSqlCommand(ISqlServerExecutionContext executionContext, SqlCommand command)
        {
            CheckISqlServerExecutionContext(executionContext);
            DataTable dataTable = new DataTable();

            dataTable.Locale = CultureInfo.CurrentCulture;
            executionContext.FillDataTableWithSqlCommand(dataTable, command);
            return(dataTable);
        }