98 references to CommandBehavior
dotnet-sql-cache (1)
Program.cs (1)
214
using (var reader = command.ExecuteReader(
CommandBehavior
.SingleRow))
Microsoft.Extensions.Caching.SqlServer (6)
DatabaseOperations.cs (6)
236
CommandBehavior
.SequentialAccess |
CommandBehavior
.SingleRow |
CommandBehavior
.SingleResult);
289
CommandBehavior
.SequentialAccess |
CommandBehavior
.SingleRow |
CommandBehavior
.SingleResult, token).ConfigureAwait(false);
Microsoft.Extensions.Caching.SqlServer.Tests (1)
SqlServerCacheWithDatabaseTest.cs (1)
739
var reader = await command.ExecuteReaderAsync(
CommandBehavior
.SingleRow);
netstandard (1)
netstandard.cs (1)
445
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.
CommandBehavior
))]
System.Data (1)
src\libraries\shims\System.Data\ref\System.Data.cs (1)
17
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.
CommandBehavior
))]
System.Data.Common (53)
System\Data\Common\DbBatch.cs (6)
33
public DbDataReader ExecuteReader(
CommandBehavior
behavior =
CommandBehavior
.Default)
36
protected abstract DbDataReader ExecuteDbDataReader(
CommandBehavior
behavior);
39
=> ExecuteDbDataReaderAsync(
CommandBehavior
.Default, cancellationToken);
42
CommandBehavior
behavior,
47
CommandBehavior
behavior,
System\Data\Common\DbCommand.cs (10)
107
protected abstract DbDataReader ExecuteDbDataReader(
CommandBehavior
behavior);
111
public DbDataReader ExecuteReader() => ExecuteDbDataReader(
CommandBehavior
.Default);
113
IDataReader IDbCommand.ExecuteReader() => ExecuteDbDataReader(
CommandBehavior
.Default);
115
public DbDataReader ExecuteReader(
CommandBehavior
behavior) => ExecuteDbDataReader(behavior);
117
IDataReader IDbCommand.ExecuteReader(
CommandBehavior
behavior) => ExecuteDbDataReader(behavior);
151
ExecuteReaderAsync(
CommandBehavior
.Default, CancellationToken.None);
154
ExecuteReaderAsync(
CommandBehavior
.Default, cancellationToken);
156
public Task<DbDataReader> ExecuteReaderAsync(
CommandBehavior
behavior) =>
159
public Task<DbDataReader> ExecuteReaderAsync(
CommandBehavior
behavior, CancellationToken cancellationToken) =>
162
protected virtual Task<DbDataReader> ExecuteDbDataReaderAsync(
CommandBehavior
behavior, CancellationToken cancellationToken)
System\Data\Common\DBCommandBuilder.cs (2)
650
using (DbDataReader dataReader = sourceCommand.ExecuteReader(
CommandBehavior
.SchemaOnly |
CommandBehavior
.KeyInfo))
System\Data\Common\DbDataAdapter.cs (26)
21
private
CommandBehavior
_fillCommandBehavior;
79
protected internal
CommandBehavior
FillCommandBehavior
83
return (_fillCommandBehavior |
CommandBehavior
.SequentialAccess);
87
_fillCommandBehavior = (value |
CommandBehavior
.SequentialAccess);
298
CommandBehavior
cmdBehavior = FillCommandBehavior;
318
CommandBehavior
cmdBehavior = FillCommandBehavior;
334
CommandBehavior
cmdBehavior = FillCommandBehavior;
344
protected virtual DataTable[] FillSchema(DataSet dataSet, SchemaType schemaType, IDbCommand command, string srcTable,
CommandBehavior
behavior)
375
protected virtual DataTable? FillSchema(DataTable dataTable, SchemaType schemaType, IDbCommand command,
CommandBehavior
behavior)
398
return (DataTable?)FillSchemaInternal(null, dataTable, schemaType, command, srcTableName, behavior |
CommandBehavior
.SingleResult);
407
private object? FillSchemaInternal(DataSet? dataset, DataTable? datatable, SchemaType schemaType, IDbCommand command, string srcTable,
CommandBehavior
behavior)
419
using (IDataReader dataReader = command.ExecuteReader(behavior |
CommandBehavior
.SchemaOnly |
CommandBehavior
.KeyInfo))
454
CommandBehavior
cmdBehavior = FillCommandBehavior;
470
CommandBehavior
cmdBehavior = FillCommandBehavior;
486
CommandBehavior
cmdBehavior = FillCommandBehavior;
495
protected virtual int Fill(DataSet dataSet, int startRecord, int maxRecords, string srcTable, IDbCommand command,
CommandBehavior
behavior)
536
CommandBehavior
cmdBehavior = FillCommandBehavior;
552
CommandBehavior
cmdBehavior = FillCommandBehavior;
561
protected virtual int Fill(DataTable dataTable, IDbCommand command,
CommandBehavior
behavior)
576
protected virtual int Fill(DataTable[] dataTables, int startRecord, int maxRecords, IDbCommand command,
CommandBehavior
behavior)
603
behavior |=
CommandBehavior
.SingleResult;
613
private int FillInternal(DataSet? dataset, DataTable[]? datatables, int startRecord, int maxRecords, string? srcTable, IDbCommand command,
CommandBehavior
behavior)
626
behavior |=
CommandBehavior
.KeyInfo;
632
behavior |=
CommandBehavior
.SequentialAccess;
1511
using (IDataReader dataReader = dataCommand.ExecuteReader(
CommandBehavior
.SequentialAccess))
System\Data\Common\DbDataSource.cs (8)
215
protected override DbDataReader ExecuteDbDataReader(
CommandBehavior
behavior)
221
return _wrappedCommand.ExecuteReader(behavior |
CommandBehavior
.CloseConnection);
241
CommandBehavior
behavior,
249
behavior |
CommandBehavior
.CloseConnection,
474
protected override DbDataReader ExecuteDbDataReader(
CommandBehavior
behavior)
480
return _wrappedBatch.ExecuteReader(behavior |
CommandBehavior
.CloseConnection);
500
CommandBehavior
behavior,
508
behavior |
CommandBehavior
.CloseConnection,
System\Data\IDbCommand.cs (1)
23
IDataReader ExecuteReader(
CommandBehavior
behavior);
System.Data.Odbc (32)
System\Data\Odbc\DbDataRecord.cs (1)
53
_randomaccess = (!record.IsBehavior(
CommandBehavior
.SequentialAccess));
System\Data\Odbc\OdbcCommand.cs (15)
539
protected override DbDataReader ExecuteDbDataReader(
CommandBehavior
behavior)
559
public new OdbcDataReader ExecuteReader(
CommandBehavior
behavior)
567
return ExecuteReaderObject(
CommandBehavior
.Default, method.ToString(), true, methodArguments, method);
570
private OdbcDataReader ExecuteReaderObject(
CommandBehavior
behavior, string method, bool needReader)
580
private OdbcDataReader ExecuteReaderObject(
CommandBehavior
behavior,
592
if (0 != (
CommandBehavior
.SingleRow & behavior))
595
behavior |=
CommandBehavior
.SingleResult;
641
if (localReader.IsBehavior(
CommandBehavior
.KeyInfo))
665
if (localReader.IsBehavior(
CommandBehavior
.KeyInfo) ||
666
localReader.IsBehavior(
CommandBehavior
.SchemaOnly))
704
if (!localReader.IsBehavior(
CommandBehavior
.SchemaOnly))
709
if ((localReader.IsBehavior(
CommandBehavior
.KeyInfo) || localReader.IsBehavior(
CommandBehavior
.SchemaOnly))
735
if (localReader.IsBehavior(
CommandBehavior
.KeyInfo) || _isPrepared)
819
if (!localReader.IsBehavior(
CommandBehavior
.SchemaOnly))
System\Data\Odbc\OdbcCommandBuilder.cs (1)
195
using (OdbcDataReader reader = new OdbcDataReader(command, cmdWrapper,
CommandBehavior
.Default))
System\Data\Odbc\OdbcDataReader.cs (15)
38
private readonly
CommandBehavior
_commandBehavior;
59
internal OdbcDataReader(OdbcCommand command, CMDWrapper cmdWrapper,
CommandBehavior
commandbehavior)
122
internal bool IsBehavior(
CommandBehavior
behavior)
222
if (IsCommandBehavior(
CommandBehavior
.KeyInfo))
357
if (IsCommandBehavior(
CommandBehavior
.CloseConnection))
412
return new DbEnumerator((IDataReader)this, IsCommandBehavior(
CommandBehavior
.CloseConnection));
461
private bool IsCommandBehavior(
CommandBehavior
condition)
628
if (!IsCommandBehavior(
CommandBehavior
.SequentialAccess))
1125
bool isRandomAccess = !IsCommandBehavior(
CommandBehavior
.SequentialAccess);
1824
if (_noMoreRows || _noMoreResults || IsCommandBehavior(
CommandBehavior
.SchemaOnly))
1867
if (IsCommandBehavior(
CommandBehavior
.SingleRow))
1919
bool singleResult = IsCommandBehavior(
CommandBehavior
.SingleResult);
2003
bool needkeyinfo = IsCommandBehavior(
CommandBehavior
.KeyInfo);
2069
if (IsCommandBehavior(
CommandBehavior
.KeyInfo))
2150
if (IsCommandBehavior(
CommandBehavior
.KeyInfo))
System.Data.OleDb (3)
artifacts\obj\System.Data.OleDb\Debug\net10.0\System.Data.OleDb.notsupported.cs (3)
49
protected override System.Data.Common.DbDataReader ExecuteDbDataReader(System.Data.
CommandBehavior
behavior) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_OleDb); }
52
public new System.Data.OleDb.OleDbDataReader ExecuteReader(System.Data.
CommandBehavior
behavior) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_OleDb); }
57
System.Data.IDataReader System.Data.IDbCommand.ExecuteReader(System.Data.
CommandBehavior
behavior) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_OleDb); }