示例#1
0
 /// <inheritdoc />
 public Task <EduHubSqlServerWriteResult> WriteToSqlServerAsync(string Server, string Database, string SqlUsername, string SqlPassword, Action <double, string> ProgressNotification)
 {
     using (var connection = new SqlConnection(
                SqlHelpers.BuildSqlConnectionString(Server, Database, SqlUsername, SqlPassword).ConnectionString))
     {
         return(WriteToSqlServerAsync(connection, ProgressNotification));
     }
 }
 /// <summary>
 /// Creates all available views in a SQL Server database, connecting to the SQL Server using the provided username and password.
 /// </summary>
 /// <param name="Server">The name or network address of the instance of SQL Server to connect to.</param>
 /// <param name="Database">The name of the Seamless Views SQL database</param>
 /// <param name="ParentDatabase">The name of the SQL database which contains the eduHub Datasets</param>
 /// <param name="SqlUsername">The SQL User ID to be used when connecting to SQL Server</param>
 /// <param name="SqlPassword">The password for the SQL Server account</param>
 public Task CreateInSqlServerAsync(string Server, string Database, string ParentDatabase, string SqlUsername, string SqlPassword)
 {
     using (var connection = new SqlConnection(
                SqlHelpers.BuildSqlConnectionString(Server, Database, SqlUsername, SqlPassword).ConnectionString))
     {
         return(CreateInSqlServerAsync(connection, ParentDatabase));
     }
 }
示例#3
0
 /// <inheritdoc />
 public EduHubSqlServerWriteResult WriteToSqlServer(string Server, string Database, Action <double, string> ProgressNotification)
 {
     using (var connection = new SqlConnection(
                SqlHelpers.BuildSqlConnectionString(Server, Database).ConnectionString))
     {
         return(WriteToSqlServer(connection, ProgressNotification));
     }
 }
 /// <summary>
 /// Creates all available views in a SQL Server database, connecting to the SQL Server using the provided username and password.
 /// </summary>
 /// <param name="Server">The name or network address of the instance of SQL Server to connect to.</param>
 /// <param name="Database">The name of the Seamless Views SQL database</param>
 /// <param name="ParentDatabase">The name of the SQL database which contains the eduHub Datasets</param>
 /// <param name="SqlUsername">The SQL User ID to be used when connecting to SQL Server</param>
 /// <param name="SqlPassword">The password for the SQL Server account</param>
 public void CreateInSqlServer(string Server, string Database, string ParentDatabase, string SqlUsername, string SqlPassword)
 {
     using (var connection = new SqlConnection(
                SqlHelpers.BuildSqlConnectionString(Server, Database, SqlUsername, SqlPassword).ConnectionString))
     {
         CreateInSqlServer(connection, ParentDatabase);
     }
 }