This documentation is archived and is not being maintained.

ObjectContext::CommandTimeout Property

Gets or sets the timeout value, in seconds, for all object context operations.

Namespace:  System.Data.Objects
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

property Nullable<int> CommandTimeout {
	Nullable<int> get ();
	void set (Nullable<int> value);

Property Value

Type: System::Nullable<Int32>
An Int32 value that is the timeout value, in seconds.


The timeout value is less than 0.

CommandTimeout specifies the timeout for executing queries and saving changes. For more information, see Object Queries (Entity Framework).

A nullptr value indicates that the default value of the underlying provider will be used.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5 SP1