|
51 | 51 | </example>
|
52 | 52 | </SqlBatch>
|
53 | 53 | <ctor1>
|
54 |
| - <summary>Initializes a new <see cref="T:SqlBatch" />.</summary> |
| 54 | + <summary>Initializes a new <see cref="T:Microsoft.Data.SqlClient.SqlBatch" />.</summary> |
55 | 55 | <example>
|
56 | 56 | <para>
|
57 | 57 | The following example creates a <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> and a <see cref="T:Microsoft.Data.SqlClient.SqlBatch" />, then adds multiple <see cref="T:Microsoft.Data.SqlClient.SqlBatchCommand" /> objects to the batch. It then executes the batch, creating a <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />. The example reads through the results of the batch commands, writing them to the console. Finally, the example closes the <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" /> and then the <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> as the <c>using</c> blocks fall out of scope.
|
|
103 | 103 | </example>
|
104 | 104 | </ctor1>
|
105 | 105 | <ctor2>
|
106 |
| - <summary>Initializes a new <see cref="T:SqlBatch" />.</summary> |
| 106 | + <summary>Initializes a new <see cref="T:Microsoft.Data.SqlClient.SqlBatch" />.</summary> |
107 | 107 | <param name="connection">
|
108 | 108 | A <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> that represents the connection to an instance of SQL Server.
|
109 | 109 | </param>
|
|
176 | 176 | </BatchCommands>
|
177 | 177 | <Commands>
|
178 | 178 | <summary>
|
179 |
| - The list of commands contained in the batch in a <see cref="T:System.Collections.Generic.List{Microsoft.Data.SqlClient.SqlBatchCommand}" />. |
| 179 | + The list of <see cref="T:Microsoft.Data.SqlClient.SqlBatchCommand" /> contained in the batch in a <see cref="T:System.Collections.Generic.List`1" />. |
180 | 180 | </summary>
|
181 | 181 | </Commands>
|
182 | 182 | <ExecuteReader>
|
|
309 | 309 | </summary>
|
310 | 310 | <returns>A <see cref="T:System.Data.Common.DbDataReader" /> object.</returns>
|
311 | 311 | <remarks>
|
312 |
| - When the batch returns multiple result sets from different commands, <see cref="P:Microsoft.Data.SqlClient.SqlDataReader.NextResult" /> can be used to advance the reader to the next result set. |
313 |
| - <note type="note"> |
314 |
| - This method benefits from <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(System.Data.CommandBehavior)" />, and all the expected exceptions of that method also apply here. |
315 |
| - </note> |
| 312 | + <format type="text/markdown"> |
| 313 | + <![CDATA[ |
| 314 | +When the batch returns multiple result sets from different commands, <xref:Microsoft.Data.SqlClient.SqlDataReader.NextResult> can be used to advance the reader to the next result set. |
| 315 | +
|
| 316 | +> [!NOTE] |
| 317 | +> This method benefits from <xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(System.Data.CommandBehavior)>, and all the expected exceptions of that method also apply here. |
| 318 | + ]]> |
| 319 | + </format> |
316 | 320 | </remarks>
|
317 | 321 | <exception cref="T:Microsoft.Data.SqlClient.SqlException">
|
318 | 322 | An error occurred while executing the batch.
|
|
329 | 333 | </summary>
|
330 | 334 | <returns>A task representing the asynchronous operation.</returns>
|
331 | 335 | <remarks>
|
332 |
| - <para> |
333 |
| - For more information about asynchronous programming, see <see href="https://learn.microsoft.com/sql/connect/ado-net/asynchronous-programming">Asynchronous Programming</see>. |
334 |
| - </para> |
335 |
| - <para> |
336 |
| - This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:System.Data.Common.DbBatch.ExecuteDbDataReader(System.Data.CommandBehavior)" />. |
337 |
| - </para> |
338 |
| - <note type="note"> |
339 |
| - This method benefits from <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteReaderAsync(System.Threading.CancellationToken)" />, and all the expected exceptions of that method also apply here. |
340 |
| - </note> |
| 336 | + <format type="text/markdown"> |
| 337 | + <. |
| 339 | +
|
| 340 | +This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <xref:System.ArgumentException>, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <xref:System.Data.Common.DbBatch.ExecuteDbDataReader(System.Data.CommandBehavior)>. |
| 341 | +
|
| 342 | +> [!NOTE] |
| 343 | +> This method benefits from <xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteReaderAsync(System.Threading.CancellationToken)>, and all the expected exceptions of that method also apply here. |
| 344 | + ]]> |
| 345 | + </format> |
341 | 346 | </remarks>
|
342 | 347 | <exception cref="T:System.OperationCanceledException">
|
343 | 348 | The cancellation token was canceled. This exception is stored into the returned task.
|
|
349 | 354 | </summary>
|
350 | 355 | <returns>The total number of rows affected across all the batch commands.</returns>
|
351 | 356 | <remarks>
|
352 |
| - You can use <see cref="M:Microsoft.Data.SqlClient.SqlBatch.ExecuteNonQuery" /> to perform catalog operations (for example, querying the structure of a database or creating database objects such as tables), or to change the data in a database by executing UPDATE, INSERT, or DELETE statements. Although <see cref="M:Microsoft.Data.SqlClient.SqlBatch.ExecuteNonQuery" /> does not return any rows, any output parameters or return values mapped to parameters are populated with data. For UPDATE, INSERT, and DELETE statements, the return value is the total number of rows affected by the batch. If no UPDATE, INSERT, or DELETE statements are included in the batch, the return value is -1. |
353 |
| - <note type="note"> |
354 |
| - This method benefits from <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQuery" />, and all the expected exceptions of that method also apply here. |
355 |
| - </note> |
| 357 | + <format type="text/markdown"> |
| 358 | + <![CDATA[ |
| 359 | +You can use <xref:Microsoft.Data.SqlClient.SqlBatch.ExecuteNonQuery> to perform catalog operations (for example, querying the structure of a database or creating database objects such as tables), or to change the data in a database by executing UPDATE, INSERT, or DELETE statements. Although <xref:Microsoft.Data.SqlClient.SqlBatch.ExecuteNonQuery> does not return any rows, any output parameters or return values mapped to parameters are populated with data. For UPDATE, INSERT, and DELETE statements, the return value is the total number of rows affected by the batch. If no UPDATE, INSERT, or DELETE statements are included in the batch, the return value is -1. |
| 360 | +
|
| 361 | +> [!NOTE] |
| 362 | +> This method benefits from <xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQuery>, and all the expected exceptions of that method also apply here. |
| 363 | + ]]> |
| 364 | + </format> |
356 | 365 | </remarks>
|
357 | 366 | </ExecuteNonQuery>
|
358 | 367 | <ExecuteNonQueryAsync>
|
|
364 | 373 | </summary>
|
365 | 374 | <returns>A task representing the asynchronous operation.</returns>
|
366 | 375 | <remarks>
|
367 |
| - <para> |
368 |
| - For more information about asynchronous programming, see <see href="https://learn.microsoft.com/sql/connect/ado-net/asynchronous-programming">Asynchronous Programming</see>. |
369 |
| - </para> |
370 |
| - <para> |
371 |
| - If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. |
372 |
| - </para> |
373 |
| - <note type="note"> |
374 |
| - This method benefits from <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQueryAsync(System.Threading.CancellationToken)" />, and all the expected exceptions of that method also apply here. |
375 |
| - </note> |
| 376 | + <format type="text/markdown"> |
| 377 | + <. |
| 379 | +
|
| 380 | +If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <xref:System.ArgumentException>, are still thrown synchronously. |
| 381 | +
|
| 382 | +> [!NOTE] |
| 383 | +> This method benefits from <xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQueryAsync(System.Threading.CancellationToken)>, and all the expected exceptions of that method also apply here. |
| 384 | + ]]> |
| 385 | + </format> |
376 | 386 | </remarks>
|
377 | 387 | <exception cref="T:Microsoft.Data.SqlClient.SqlException">An error occurred while executing the batch.</exception>
|
378 | 388 | <related type="Article" href="https://learn.microsoft.com/sql/connect/ado-net/overview-sqlclient-driver">Overview of the SqlClient driver</related>
|
|
396 | 406 | </summary>
|
397 | 407 | <returns>The first column of the first row in the first result set.</returns>
|
398 | 408 | <remarks>
|
399 |
| - This method benefits from <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteScalarAsync" />, and all the expected exceptions of that method also apply here. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. |
| 409 | + This method benefits from <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteScalarAsync(System.Threading.CancellationToken)" />, and all the expected exceptions of that method also apply here. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. |
400 | 410 | </remarks>
|
401 | 411 | <exception cref="T:Microsoft.Data.SqlClient.SqlException">
|
402 | 412 | An error occurred while executing the batch.
|
|
0 commit comments