-
Notifications
You must be signed in to change notification settings - Fork 292
/
Copy pathProgram.cs
27 lines (23 loc) · 955 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
namespace Microsoft.Data.SqlClient.DockerLinuxTest
{
class Program
{
static string server = "microsoft.sqlserver";
static string user = "sa";
// Provide password as set in docker-compose.yml
static string pwd = "P@ssw0rd!123";
static void Main(string[] args)
{
using (SqlConnection sqlConnection = new SqlConnection($"Server={server}; UID={user}; PWD={pwd}"))
{
sqlConnection.Open();
Console.WriteLine($"Connected to SQL Server v{sqlConnection.ServerVersion} from {Environment.OSVersion.VersionString}");
// Write your code here to debug inside Docker Linux containers.
}
}
}
}