Skip to content

Instantly share code, notes, and snippets.

@aanari
Created July 16, 2012 12:59
Show Gist options
  • Save aanari/3122542 to your computer and use it in GitHub Desktop.
Save aanari/3122542 to your computer and use it in GitHub Desktop.
Fix CommandTimeout in DbContext
public class MyContext : DbContext
{
public MyContext ()
: base(ContextHelper.CreateConnection("my connection string"), true)
{
((IObjectContextAdapter)this).ObjectContext.CommandTimeout = 300;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment