LocalDB named instance using SqlConnection

Connection string

This .NET Framework 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.

To create a named instance, use the SqlLocalDB.exe program. Example SqlLocalDB.exe create MyInstance and SqlLocalDB.exe start MyInstance

Server=(localdb)\MyInstance;Integrated Security=true;