Reuse existing DatabaseConnection in SqlBulkCopy

Hi there!

I have several processes using common library for establishing a connection to database. As an output this library returns object of type UiPath.Database.DatabaseConnection

Recently I found out that standard Insert activity takes long time to insert DataTable, containing several thousand records, into Database - for example, 2300 records are inserted in 7.5 minutes. Not quite performant. So I developed new library which inserts DataTable using SqlBulkCopy class and it handles much faster: abovementioned 2300 records are now uploaded in 4 sec. only - speed up is really enormous!
The problem is that SqlBulkCopy accepts SqlConnection instance or connection string for actually connecting to a database. Is there any way to feed somehow instance of DatabaseConnection type to SqlBulkCopy? Probably DatabaseConnection can be converted to SqlConnection type, or connection string may be extracted from DatabaseConnection…

Thanks in advance!