Elapsed time of the last query to the database.
Namespace: Nemiro.Data.SqlAssembly: Nemiro.Data (in Nemiro.Data.dll) Version: 2.11.4.126 (2.11.4.126)
public TimeSpan LastQueryTime { get; }
public TimeSpan LastQueryTime { get; }
Public ReadOnly Property LastQueryTime As TimeSpan
Get
Public ReadOnly Property LastQueryTime As TimeSpan
Get
Property Value
Type:
TimeSpanusing (SqlClient client = new SqlClient())
{
client.CommandText = "WAITFOR DELAY '00:00:03'";
client.ExecuteNonQuery();
Console.WriteLine("Query execution time: {0}", client.LastQueryTime);
}
using (SqlClient client = new SqlClient())
{
client.CommandText = "WAITFOR DELAY '00:00:03'";
client.ExecuteNonQuery();
Console.WriteLine("Query execution time: {0}", client.LastQueryTime);
}
Using client As New SqlClient()
client.CommandText =
client.ExecuteNonQuery();
Console.WriteLine("Query execution time: {0}", client.LastQueryTime);
End Using
Using client As New SqlClient()
client.CommandText = "WAITFOR DELAY '00:00:03'"
client.ExecuteNonQuery();
Console.WriteLine("Query execution time: {0}", client.LastQueryTime);
End Using