SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\PC\Desktop\Projects\DApp\Database.mdf;Integrated Security=True;Connect Timeout=30");
It won't work, because it refers to MS SQL server installed on developement computer...
If you would like to share database in LAN, you have to enable remote connections for MS SQL Server. For futher details, please see:
Configure the remote access Server Configuration Option | Microsoft Docs[
^]
Then you have to change
connection string[
^].
Imagine, you're the one who has access to that SQL Server instance till enable remote connections. In other words, SQL server have to broadcast its existence in a LAN ;)