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

Commit 3d60899

Browse files
Update OrmLiteCountTests.cs
1 parent 252607d commit 3d60899

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/ServiceStack.OrmLite.FirebirdTests/Expressions/OrmLiteCountTests.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,13 @@ public void CanDoCountWithInterfaceAndPredicate()
6565

6666
long Count<T>(IDbConnection db) where T : IHasId<int>, new()
6767
{
68-
T request = new T();
69-
return db.GetScalar<T, long>(e => Sql.Count(request.Id));
68+
return db.GetScalar<T, long>(e => Sql.Count(e.Id));
7069
}
7170

7271

7372
long CountByColumn<T>(IDbConnection db) where T : IHasCountColumn, new()
7473
{
75-
T request = new T();
76-
return db.GetScalar<T, long?>(e => Sql.Count(request.CountColumn)).Value;
74+
return db.GetScalar<T, long?>(e => Sql.Count(e.CountColumn)).Value;
7775
}
7876

7977

@@ -108,4 +106,4 @@ public CountTestTable() { }
108106
public int? CountColumn { get; set; }
109107
#endregion
110108
}
111-
}
109+
}

0 commit comments

Comments
 (0)