EntityConnection.ConnectionTimeout 屬性
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 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