My command keeps timing out, so I need to change the default command timeout value.
I\'ve found myDb.Database.Connection.ConnectionTimeout, but it\'s
myDb.Database.Connection.ConnectionTimeout
Same as other answers, but as an extension method:
static class Extensions { public static void SetCommandTimeout(this IObjectContextAdapter db, TimeSpan? timeout) { db.ObjectContext.CommandTimeout = timeout.HasValue ? (int?) timeout.Value.TotalSeconds : null; } }