From 0406270093cb6c002ff3d60e230af170136c7f8d Mon Sep 17 00:00:00 2001 From: Ahmad Moussawi Date: Mon, 1 Jun 2020 10:39:52 +0300 Subject: [PATCH] make Count params optional --- SqlKata.Execution/Query.Extensions.cs | 4 ++-- version.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SqlKata.Execution/Query.Extensions.cs b/SqlKata.Execution/Query.Extensions.cs index e7a98a41..9d9bccdd 100644 --- a/SqlKata.Execution/Query.Extensions.cs +++ b/SqlKata.Execution/Query.Extensions.cs @@ -242,14 +242,14 @@ public static async Task AggregateAsync(this Query query, string aggregate return await db.ExecuteScalarAsync(query.AsAggregate(aggregateOperation, columns), transaction, timeout); } - public static T Count(this Query query, string[] columns, IDbTransaction transaction = null, int? timeout = null) + public static T Count(this Query query, string[] columns = null, IDbTransaction transaction = null, int? timeout = null) { var db = CreateQueryFactory(query); return db.ExecuteScalar(query.AsCount(columns), transaction, timeout); } - public static async Task CountAsync(this Query query, string[] columns, IDbTransaction transaction = null, int? timeout = null) + public static async Task CountAsync(this Query query, string[] columns = null, IDbTransaction transaction = null, int? timeout = null) { var db = CreateQueryFactory(query); diff --git a/version.props b/version.props index 5561707a..8361c2d2 100644 --- a/version.props +++ b/version.props @@ -1,6 +1,6 @@ - 2.1.0 + 2.2.0 \ No newline at end of file