@@ -111,23 +111,31 @@ public Task<int> ExecuteNonQueryAsync()
111111 /// <summary>
112112 /// Calls ExecuteScalarAsync on the underlying command.
113113 /// </summary>
114- /// <returns>The varlue returned from the method.</returns>
114+ /// <returns>The value returned from the method.</returns>
115115 public Task < object > ExecuteScalarAsync ( )
116116 => ExecuteAsync ( command => command . ExecuteScalarAsync ( ) ) ;
117117
118118 /// <summary>
119119 /// Asynchronously executes scalar on the underlying command.
120120 /// </summary>
121121 /// <typeparam name="T">The type expected.</typeparam>
122- /// <returns>The varlue returned from the method.</returns>
122+ /// <returns>The value returned from the method.</returns>
123123 public async Task < T > ExecuteScalarAsync < T > ( Func < object , T > transform )
124124 => transform ( await ExecuteScalarAsync ( ) ) ;
125125
126+ /// <summary>
127+ /// Asynchronously executes scalar on the underlying command and casts to the expected type.
128+ /// </summary>
129+ /// <typeparam name="T">The type expected.</typeparam>
130+ /// <returns>The value returned from the method.</returns>
131+ public async Task < T > ExecuteScalarAsync < T > ( )
132+ => ( T ) ( await ExecuteScalarAsync ( ) ) ;
133+
126134 /// <summary>
127135 /// Asynchronously executes scalar on the underlying command.
128136 /// </summary>
129137 /// <typeparam name="T">The type expected.</typeparam>
130- /// <returns>The varlue returned from the method.</returns>
138+ /// <returns>The value returned from the method.</returns>
131139 public async Task < T > ExecuteScalarAsync < T > ( Func < object , Task < T > > transform )
132140 => await transform ( await ExecuteScalarAsync ( ) ) ;
133141
0 commit comments