Database mirroring using MSOLEDBSQL
This Microsoft OLE DB Driver for SQL Server connection string can be used for connections to SQL Server 2019, SQL Server 2017, SQL Server 2016, SQL Server 2014 and SQL Server 2012.
If you connect with ADO.NET or the SQL Native Client to a database that is being mirrored, your application can take advantage of the drivers ability to automatically redirect connections when a database mirroring failover occurs. You must specify the initial principal server and database in the connection string and the failover partner server.
Failover Partner=myMirrorServerAddress;Initial Catalog=myDataBase;
There is ofcourse many other ways to write the connection string using database mirroring, this is just one example pointing out the failover functionality. You can combine this with the other connection strings options available.