public class WeedingContext : DbContext
{
public WeedingContext()
: base("WeddingDb")
{
}
.
.
.
.
.
by add in new code for the DBContect to extent the SQLServer timeout
public class WeedingContext : DbContext
{
public WeedingContext()
: base("WeddingDb")
{
// Get the ObjectContext related to this DbContext
var objectContext = (this as IObjectContextAdapter).ObjectContext;
// Sets the command timeout for all the commands
objectContext.CommandTimeout = 180;
}
Regards:Zaif Ullah
Share This with your friend by choosing any social account