LocalDB shared instance using Microsoft.Data.SqlClient
Connection string
This Microsoft SqlClient Data Provider 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.
Both automatic and named instances of LocalDB can be shared.
Server=(localdb)\.\MyInstanceShare;Integrated Security=true;
Use SqlLocalDB.exe to share or unshare an instance. For example execute SqlLocalDB.exe share "MyInstance" "MyInstanceShare" to share an instance.