DbException.IsTransient 属性
定义
指示此 DbException 表示的错误是否可能是暂时性错误,即重试触发操作是否可以在不进行任何其他更改的情况下成功。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.
public:
virtual property bool IsTransient { bool get(); };
public virtual bool IsTransient { get; }
member this.IsTransient : bool
Public Overridable ReadOnly Property IsTransient As Boolean
属性值
true 如果表示的错误可能是暂时性错误,则为; false 否则为。true if the error represented could be a transient error; false otherwise.
注解
暂时性错误的示例包括无法获取数据库锁,网络问题。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.