/// <summary> /// Clear the pools associated with the provided connection /// </summary> public static bool TryClearPool(this DbConnection connection) => connection != null && ByTypeHelpers.Get(connection.GetType()).TryClearPool(connection);
/// <summary> /// Indicates whether the provided exception has an integer Number property with the supplied value /// </summary> public static bool IsNumber(this DbException exception, int number) => exception != null && ByTypeHelpers.Get(exception.GetType()).IsNumber(exception, number);
/// <summary> /// Attempt to get the client connection id for a given connection /// </summary> public static bool TryGetClientConnectionId(this DbConnection connection, out Guid clientConnectionId) { clientConnectionId = default; return(connection != null && ByTypeHelpers.Get(connection.GetType()).TryGetClientConnectionId( connection, out clientConnectionId)); }