コード例 #1
0
 private async Task PutDownloadRecords(XDocument batch, int expectedLastOriginalKey)
 {
     using (var connection = await Destination.ConnectTo())
     {
         using (var command = new SqlCommand("AddDownloadFacts", connection))
         {
             command.CommandType = CommandType.StoredProcedure;
             command.Parameters.Add(new SqlParameter("@facts", batch.ToString()));
             command.Parameters.Add(new SqlParameter("@expectedLastOriginalKey", expectedLastOriginalKey));
             await command.ExecuteNonQueryAsync();
         }
     }
 }