aboutsummaryrefslogtreecommitdiff
path: root/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-12-21 16:42:07 +0800
committercrupest <crupest@outlook.com>2022-12-21 16:42:07 +0800
commita5ddd51b4b01ddd2494fcde3cdb63da6819a8766 (patch)
treef0f9f56609f82e858489d3852165844b2f0434e2 /docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs
parent673aeab45542400efcbbe7f400c806af7b336df1 (diff)
downloadcrupest-a5ddd51b4b01ddd2494fcde3cdb63da6819a8766.tar.gz
crupest-a5ddd51b4b01ddd2494fcde3cdb63da6819a8766.tar.bz2
crupest-a5ddd51b4b01ddd2494fcde3cdb63da6819a8766.zip
Develop secret api. v55
Diffstat (limited to 'docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs')
-rw-r--r--docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs b/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs
index abae774..eab8567 100644
--- a/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs
+++ b/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs
@@ -61,6 +61,12 @@ public class CrudService<TEntity> : IDisposable where TEntity : class
return result;
}
+ public int GetCount()
+ {
+ var result = _table.SelectCount(_dbConnection);
+ return result;
+ }
+
public TEntity GetByKey(object key)
{
var result = _table.Select<TEntity>(_dbConnection, null, WhereClause.Create().Eq(_table.KeyColumn.ColumnName, key)).SingleOrDefault();