Skip to content

Commit 0406270

Browse files
make Count params optional
1 parent 8038d9b commit 0406270

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

SqlKata.Execution/Query.Extensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,14 @@ public static async Task<T> AggregateAsync<T>(this Query query, string aggregate
242242
return await db.ExecuteScalarAsync<T>(query.AsAggregate(aggregateOperation, columns), transaction, timeout);
243243
}
244244

245-
public static T Count<T>(this Query query, string[] columns, IDbTransaction transaction = null, int? timeout = null)
245+
public static T Count<T>(this Query query, string[] columns = null, IDbTransaction transaction = null, int? timeout = null)
246246
{
247247
var db = CreateQueryFactory(query);
248248

249249
return db.ExecuteScalar<T>(query.AsCount(columns), transaction, timeout);
250250
}
251251

252-
public static async Task<T> CountAsync<T>(this Query query, string[] columns, IDbTransaction transaction = null, int? timeout = null)
252+
public static async Task<T> CountAsync<T>(this Query query, string[] columns = null, IDbTransaction transaction = null, int? timeout = null)
253253
{
254254
var db = CreateQueryFactory(query);
255255

version.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<VersionPrefix>2.1.0</VersionPrefix>
3+
<VersionPrefix>2.2.0</VersionPrefix>
44
<VersionSuffix></VersionSuffix>
55
</PropertyGroup>
66
</Project>

0 commit comments

Comments
 (0)