Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
CommandTimeout Property

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)

public Nullable<int> CommandTimeout { get; set; }

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 null 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

Community Additions

© 2015 Microsoft