Skip to content

Commit

Permalink
make Count params optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmad-moussawi committed Jun 1, 2020
1 parent 8038d9b commit 0406270
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions SqlKata.Execution/Query.Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,14 @@ public static async Task<T> AggregateAsync<T>(this Query query, string aggregate
return await db.ExecuteScalarAsync<T>(query.AsAggregate(aggregateOperation, columns), transaction, timeout);
}

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion version.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<VersionPrefix>2.1.0</VersionPrefix>
<VersionPrefix>2.2.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>

0 comments on commit 0406270

Please sign in to comment.