EntityConnection.ConnectionTimeout 属性

定义

获取从尝试建立连接到结束尝试并生成错误需要等待的秒数。Gets the number of seconds to wait when attempting to establish a connection before ending the attempt and generating an error.

public:
 virtual property int ConnectionTimeout { int get(); };
public override int ConnectionTimeout { get; }
member this.ConnectionTimeout : int
Public Overrides ReadOnly Property ConnectionTimeout As Integer

属性值

Int32

等待连接打开所需的时间(以秒为单位)。The time (in seconds) to wait for a connection to open. 默认值为基础数据提供程序的默认超时值。The default value is the underlying data provider's default time-out.

例外

设置的值小于 0。The value set is less than 0.

注解

如果基础数据提供程序未知,则返回零。Returns zero if the underlying data provider is not known.

适用于