forked from microsoft/GraphView
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTutorialConfiguration.cs
More file actions
39 lines (38 loc) · 1.67 KB
/
Copy pathTutorialConfiguration.cs
File metadata and controls
39 lines (38 loc) · 1.67 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GraphViewTutorial
{
public static class TutorialConfiguration
{
#region You should set up connection settings before running tutorial
public static bool localTest = true;
// Parameters for local connection
private static string yourSQLServerName = @"(local)\MS15";
private static string yourDBName = "graphViewTest";
// Parameters for Azure connection
private static string yourAzureSQLAddress = "graphview.database.windows.net";
private static string yourAzureSQLDBName = "graphViewTest";
private static string yourAzureUserId = "xxx";
private static string yourAzurePassword = "xxx";
#endregion
/// <summary>
/// Returns the string for graphviewConnection
/// </summary>
public static string getConnectionString()
{
if (localTest)
return "Data Source=" + yourSQLServerName
+ ";Initial Catalog=" + yourDBName
+ ";Integrated Security=True;Connect Timeout=3000;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False;Max Pool Size=300";
else
return "Server=tcp:" + yourAzureSQLAddress
+ ";Database=" + yourAzureSQLDBName
+ ";User ID=" + yourAzureUserId
+ ";Password= " + yourAzurePassword
+ ";Trusted_Connection=False;Encrypt=True;Max Pool Size=3000;Connect Timeout=0";
}
}
}