DbCommandLogData DbCommandLogData Class

Definition

Warning

This API is now obsolete.

Logging information about a System.Data.Common.DbCommand that is being executed.

Instances of this class are typically created by Entity Framework and passed to loggers, it is not designed to be directly constructed in your application code.

[Obsolete("This class is obsolete. It will be removed in a future release.")]
public class DbCommandLogData : IEnumerable<KeyValuePair<string, object>>, IEnumerable
<Obsolete("This class is obsolete. It will be removed in a future release.")>
Public Class DbCommandLogData
    Implements IEnumerable(Of KeyValuePair(Of String, Object)), IEnumerable
Inheritance
System.ObjectSystem.Object
DbCommandLogDataDbCommandLogData
Attributes
System.ObsoleteAttribute
Implements
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Object>>System.Collections.Generic.IEnumerable(Of System.Collections.Generic.KeyValuePair(Of System.String, System.Object)) System.Collections.IEnumerableSystem.Collections.IEnumerable

Constructors

DbCommandLogData(String, CommandType, Int32, IReadOnlyList, Nullable) DbCommandLogData(String, CommandType, Int32, IReadOnlyList(Of DbParameterLogData), Nullable(Of Int64))

Initializes a new instance of the DbParameterLogData class.

public DbCommandLogData(string commandText, CommandType commandType, int commandTimeout, IReadOnlyList<DbParameterLogData> parameters, long ? elapsedMilliseconds)
Public Sub New(commandText As String, commandType As CommandType, commandTimeout As Integer, parameters As IReadOnlyList(Of DbParameterLogData), elapsedMilliseconds As Long?)
Parameters
commandText
System.String System.String

The command text being executed.

commandType
System.Data.CommandType System.Data.CommandType

The type of command being executed.

commandTimeout
System.Int32 System.Int32

The timeout configured for the command.

parameters
System.Collections.Generic.IReadOnlyList<DbParameterLogData> System.Collections.Generic.IReadOnlyList(Of DbParameterLogData)

Parameters for the command.

elapsedMilliseconds
System.Nullable<System.Int64> System.Nullable(Of System.Int64)

How many milliseconds the command took to execute (if it has completed).

Properties

CommandText CommandText

Gets the command text being executed.

public virtual string CommandText { get; }
Public Overridable ReadOnly Property CommandText As String
Value
System.String System.String

CommandTimeout CommandTimeout

Gets the timeout configured for the command.

public virtual int CommandTimeout { get; }
Public Overridable ReadOnly Property CommandTimeout As Integer
Value
System.Int32 System.Int32

CommandType CommandType

Gets the type of command being executed.

public virtual CommandType CommandType { get; }
Public Overridable ReadOnly Property CommandType As CommandType
Value
System.Data.CommandType System.Data.CommandType

ElapsedMilliseconds ElapsedMilliseconds

Gets how many milliseconds the command took to execute (if it has completed).

public virtual long ? ElapsedMilliseconds { get; }
Public Overridable ReadOnly Property ElapsedMilliseconds As Long?
Value
System.Nullable<System.Int64> System.Nullable(Of System.Int64)

Parameters Parameters

Gets the parameters for the command.

public virtual IReadOnlyList<DbParameterLogData> Parameters { get; }
Public Overridable ReadOnly Property Parameters As IReadOnlyList(Of DbParameterLogData)
Value
System.Collections.Generic.IReadOnlyList<DbParameterLogData> System.Collections.Generic.IReadOnlyList(Of DbParameterLogData)

Methods

Equals(Object) Equals(Object)

Inherited from System.Object

Equals(Object, Object) Equals(Object, Object)

Inherited from System.Object

GetEnumerator() GetEnumerator()

public virtual IEnumerator<KeyValuePair<string, object>> GetEnumerator()
Public Overridable Function GetEnumerator As IEnumerator(Of KeyValuePair(Of String, Object))
Returns
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String, System.Object>> System.Collections.Generic.IEnumerator(Of System.Collections.Generic.KeyValuePair(Of System.String, System.Object))

GetHashCode() GetHashCode()

Inherited from System.Object

GetType() GetType()

Inherited from System.Object

MemberwiseClone() MemberwiseClone()

Inherited from System.Object

ReferenceEquals(Object, Object) ReferenceEquals(Object, Object)

Inherited from System.Object

ToString() ToString()

Inherited from System.Object

Explicit Interface Implementations

IEnumerable.GetEnumerator() System.Collections.IEnumerable.GetEnumerator()

IEnumerator IEnumerable.GetEnumerator()
Function System.Collections.IEnumerable.GetEnumerator As IEnumerator Implements IEnumerable.GetEnumerator
Returns
System.Collections.IEnumerator System.Collections.IEnumerator