EntityConnection.ConnectionTimeout 属性
[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]
获取从尝试建立连接到结束尝试并生成错误需要等待的秒数。
命名空间: System.Data.Entity.Core.EntityClient
程序集: EntityFramework(在 EntityFramework.dll 中)
语法
声明
<SuppressMessageAttribute("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")> _
Public Overrides ReadOnly Property ConnectionTimeout As Integer
Get
用法
Dim instance As EntityConnection
Dim value As Integer
value = instance.ConnectionTimeout
[SuppressMessageAttribute("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")]
public override int ConnectionTimeout { get; }
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1065:DoNotRaiseExceptionsInUnexpectedLocations")]
public:
virtual property int ConnectionTimeout {
int get () override;
}
[<SuppressMessageAttribute("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")>]
abstract ConnectionTimeout : int
[<SuppressMessageAttribute("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")>]
override ConnectionTimeout : int
override function get ConnectionTimeout () : int
属性值
类型:System.Int32
等待连接打开所需的时间(以秒为单位)。默认值为基础数据提供程序的默认超时值。
Implements
IDbConnection.ConnectionTimeout