File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -54,13 +54,9 @@ should be familiar with [Async/Await - Best Practices in Asynchronous Programmin
54
54
<td>ExecuteScalar</td>
55
55
</tr >
56
56
<tr >
57
- <td rowspan="4 " style="vertical-align:middle">
57
+ <td rowspan="3 " style="vertical-align:middle">
58
58
<a href="https://docs.microsoft.com/en-us/dotnet/core/api/system.data.common.dbdatareader">DbDataReader</a>
59
59
</td>
60
- <td>GetFieldValueAsync</td>
61
- <td>GetFieldValue</td>
62
- </tr >
63
- <tr >
64
60
<td>IsDBNullAsync</td>
65
61
<td>IsDBNull</td>
66
62
</tr >
@@ -92,6 +88,13 @@ should be familiar with [Async/Await - Best Practices in Asynchronous Programmin
92
88
<span class =" text-danger " >* </span >Async Transaction methods are not part of ADO.NET, they are provided by
93
89
MySqlConnector to allow database code to remain fully asynchronous.
94
90
91
+ ### Exception: DbDataReader.GetFieldValueAsync
92
+
93
+ Once ` DbDataReader.ReadAsync ` (or ` DbDataReader.Read ` ) has returned ` true ` , the full contents of the current
94
+ row are will be memory. Calling ` GetFieldValue<T> ` will return the value immediately (without blocking on I/O).
95
+ It will have higher performance than ` GetFieldValueAsync<T> ` because it doesn't have to allocate a ` Task<T> `
96
+ to store the result. There is no performance benefit to using the ` DbDataReader.GetFieldValueAsync<T> ` method.
97
+
95
98
### Example Console Application
96
99
97
100
In order to get the full benefit of asynchronous operation, every method in the call stack that eventually calls
You can’t perform that action at this time.
0 commit comments