private async Task <int> SqlCommand(SyncTask task) { SqlConnectionParameter sqlConnection = Helper.GetSqlConnection(_job.Connections, task.TargetConnection); _sqlAdapter.ConnectionParameter = sqlConnection; _sqlAdapter.Command = task.TargetCommand.ToString(); _sqlAdapter.Map = task.Mapping; int results = await _sqlAdapter.ExecuteCommandAsync(); return(results); }
private async Task <UpsertResult[]> SynchToSfdc(SyncTask task) { SqlConnectionParameter sqlConnection = Helper.GetSqlConnection(_job.Connections, task.SourceConnection); SfdcConnectionParameter sfdcConnection = Helper.GetSfdcConnection(_job.Connections, task.TargetConnection); SfdcCommand command = Helper.GetSfdcCommand(task.TargetCommand.ToString()); _sfdcAdapter.ConnectionParameter = sfdcConnection; _sfdcAdapter.Command = command; _sfdcAdapter.Map = task.Mapping; _sqlAdapter.ConnectionParameter = sqlConnection; UpsertResult[] results = await _sqlAdapter.SyncAsync(task.SourceCommand.ToString(), _sfdcAdapter.UpsertAsync); return(results); }
private async Task <object[]> SynchToSql(SyncTask task) { SqlConnectionParameter sqlConnection = Helper.GetSqlConnection(_job.Connections, task.TargetConnection); SfdcConnectionParameter sfdcConnection = Helper.GetSfdcConnection(_job.Connections, task.SourceConnection); SfdcCommand command = Helper.GetSfdcCommand(task.SourceCommand.ToString()); _sqlAdapter.ConnectionParameter = sqlConnection; _sqlAdapter.Command = task.TargetCommand.ToString(); _sqlAdapter.Map = task.Mapping; _sfdcAdapter.ConnectionParameter = sfdcConnection; _sfdcAdapter.Command = command; object[] results = await _sfdcAdapter.SyncAsync(command.CommandText, _sqlAdapter.ExecuteAsync); return(results); }