How to set framework timeout with C#?

How to set framework timeout with C# ?

Hey Richard,

For Entity Framework Core 1.0, please use the syntax: this.context.Database.SetCommandTimeout(180);

For Entity Framework 6: this.context.Database.CommandTimeout = 180;