Hello Storm, the command timeout needs to be set at the ObjectContext level. You can set it at least in the EF 4.1:
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
publicclass YourContext : DbContext
{
public YourContext()
: base("YourConnectionString")
{
// Get the ObjectContext related to this DbContextvar objectContext = (thisas IObjectContextAdapter).ObjectContext;
// Sets the command timeout for all the commands
objectContext.CommandTimeout = 120;
}
}
Hope this help you.
Regards,
Miguel.
Proposed as answer byPawel KadluczkaWednesday, April 20, 2011 5:18 AM
Marked as answer byJackie-SunMonday, April 25, 2011 5:41 AM
Hello Storm, the command timeout needs to be set at the ObjectContext level. You can set it at least in the EF 4.1:
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
publicclass YourContext : DbContext
{
public YourContext()
: base("YourConnectionString")
{
// Get the ObjectContext related to this DbContextvar objectContext = (thisas IObjectContextAdapter).ObjectContext;
// Sets the command timeout for all the commands
objectContext.CommandTimeout = 120;
}
}
Hope this help you.
Regards,
Miguel.
Proposed as answer byPawel KadluczkaWednesday, April 20, 2011 5:18 AM
Marked as answer byJackie-SunMonday, April 25, 2011 5:41 AM