My school project is in VisualStudio, there I have a local SQL Database. I will submit the project to teacher, but I connect SQL with this way:
SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\michalbrany\source\repos\CZU_projekt\zakaznickeudaje.mdf;Integrated Security=True;Connect Timeout=30");
Problem is, that my teacher will have downloaded the project to their Desktop, so this way will be incorrect. Can I use this?
SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=..\..\..\..\..\..\zakaznickeudaje.mdf;Integrated Security=True;Connect Timeout=30");
Or something else?