语言

EntityConnection.ConnectionTimeout 属性

定义

获取在尝试建立连接之前尝试建立连接并生成错误时等待的秒数。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")]
public override int ConnectionTimeout { get; }
member this.ConnectionTimeout : int
Public Overrides ReadOnly Property ConnectionTimeout As Integer

属性值

等待连接打开的时间(以秒为单位)。 默认值是基础数据提供程序的默认超时。

特性

例外

设置的值小于 0。

适用于