nhibernate-core
nhibernate-core copied to clipboard
No way to set Command Timeout for SchemaUpdate
SchemaUpdate uses the connection directly to create a Command bypassing any opportunity to set the CommandTimeout (or any other settings). Any command taking longer than the default value (30 seconds for SqlCommand) will timeout.
connectionHelper.Prepare();
connection = connectionHelper.Connection;
meta = new DatabaseMetadata(connection, dialect);
stmt = connection.CreateCommand();
@gsivorot If you use a recent version of Microsoft.Data.SqlClient you can set the default command timeout in the connection string