aboutsummaryrefslogtreecommitdiff
path: root/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs')
-rw-r--r--docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs46
1 files changed, 0 insertions, 46 deletions
diff --git a/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs b/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs
index 7944c18..5d73002 100644
--- a/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs
+++ b/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs
@@ -38,50 +38,4 @@ public class CrudService<TEntity> : IDisposable where TEntity : class
{
_dbConnection.Dispose();
}
-
- public List<TEntity> Select(IWhereClause? filter)
- {
- return _table.Select<TEntity>(_dbConnection, null, filter).ToList();
- }
-
- public bool Exists(IWhereClause? filter)
- {
- return _table.SelectCount(_dbConnection, filter) > 0;
- }
-
- public int Count(IWhereClause? filter)
- {
- return _table.SelectCount(_dbConnection, filter);
- }
-
- // Return the key.
- public object Insert(IInsertClause insertClause)
- {
- return _table.Insert(_dbConnection, insertClause);
- }
-
- public int Update(IUpdateClause updateClause, IWhereClause? filter)
- {
- return _table.Update(_dbConnection, filter, updateClause);
- }
-
- public int Delete(IWhereClause? filter)
- {
- return _table.Delete(_dbConnection, filter);
- }
-
- public TEntity SelectByKey(object key)
- {
- return Select(WhereClause.Create().Eq(_table.KeyColumn.ColumnName, key)).Single();
- }
-
- public List<JsonDocument> SelectAsJson(IWhereClause? filter)
- {
- return Select(filter).Select(e => _jsonHelper.ConvertEntityToJson(e)).ToList();
- }
-
- public JsonDocument SelectAsJsonByKey(object key)
- {
- return SelectAsJson(WhereClause.Create().Eq(_table.KeyColumn.ColumnName, key)).Single();
- }
}