Rock.Data.DbService.GetDataTable C# (CSharp) Method

GetDataTable() public static method

Gets a data table.
public static GetDataTable ( string query, CommandType commandType, object>.Dictionary parameters ) : DataTable
query string The query.
commandType CommandType Type of the command.
parameters object>.Dictionary The parameters.
return DataTable
        public static DataTable GetDataTable( string query, CommandType commandType, Dictionary<string, object> parameters )
        {
            DataSet dataSet = DbService.GetDataSet( query, commandType, parameters );
            if ( dataSet.Tables.Count > 0 )
            {
                return dataSet.Tables[0];
            }

            return null;
        }