I'm trying to run SQL backups through a stored procedure through Dapper (the rest of my app uses Dapper so I'd prefer to keep this portion running through it as well). It works just fine until the CommandTimeout kicks in.
using (var c = SqlConnection(connstring))
{
c.Open();
var p = new DynamicParameters();
// fill out p
c.Execute("xp_backup_database", p, commandType: CommandType.StoredProcedure);
}
The only CommandTimeout setting I know of is in SqlCommand. Is there a way to set this via Dapper?