DbException.IsTransient Property

Definition

Indicates whether the error represented by this DbException could be a transient error, i.e. if retrying the triggering operation may succeed without any other change.

C#
public virtual bool IsTransient { get; }

Property Value

true if the error represented could be a transient error; false otherwise.

Remarks

Examples of transient errors include failure to acquire a database lock, networking issues. This allows automatic retry execution strategies to be developed without knowledge of specific database error codes.

Applies to

Product Versions
.NET 5, 6, 7, 8, 9, 10