Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 8901b28

Browse files
Update OrmLiteCountTests.cs
fix methods "long Count(IDbConnection db)" and "long CountByColumn(IDbConnection db)"
1 parent 43807ed commit 8901b28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ServiceStack.OrmLite.MySql.Tests/Expressions/OrmLiteCountTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ long CountByColumn<T>(IDbConnection db) where T : IHasCountColumn
7676
}
7777

7878

79-
int Count<T>(IDbConnection db, Expression<Func<T, bool>> predicate) where T : IHasId<int>, new()
79+
int Count<T>(IDbConnection db, Expression<Func<T, bool>> predicate) where T : IHasId<int>
8080
{
8181
return db.Scalar<T, int>(e => Sql.Count(e.Id), predicate);
8282
}
8383

84-
int CountByColumn<T>(IDbConnection db, Expression<Func<T, bool>> predicate) where T : IHasCountColumn, new()
84+
int CountByColumn<T>(IDbConnection db, Expression<Func<T, bool>> predicate) where T : IHasCountColumn
8585
{
8686
return db.Scalar<T, int?>(e => Sql.Count(e.CountColumn), predicate).Value;
8787
}

0 commit comments

Comments
 (0)