Я пробовал:
Код: Выделить всё
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"..\..\Database\DATABASE.mdf");
Код: Выделить всё
string downloadsPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Downloads");
// Construct the full path to the database
string databasePath = Path.Combine(downloadsPath, "DATABASE.mdf");
// Connection string using the dynamic path
string connectionString = $@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename={databasePath};Integrated Security=True";
Подробнее здесь: https://stackoverflow.com/questions/792 ... per-client