diff options
author | crupest <crupest@outlook.com> | 2022-12-14 15:58:41 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-12-20 20:32:53 +0800 |
commit | 94d39ea715ae81ef93e1bc289762b7500db197f9 (patch) | |
tree | 5a2ee9b099b72f15df1384f6b095b2b9d301d587 /docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs | |
parent | 799170d34c8b59116895f07328412c4b2236b39e (diff) | |
download | crupest-94d39ea715ae81ef93e1bc289762b7500db197f9.tar.gz crupest-94d39ea715ae81ef93e1bc289762b7500db197f9.tar.bz2 crupest-94d39ea715ae81ef93e1bc289762b7500db197f9.zip |
Develop secret api. v38
Diffstat (limited to 'docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs')
-rw-r--r-- | docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs b/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs index 5d73002..796761e 100644 --- a/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs +++ b/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs @@ -4,7 +4,6 @@ using Dapper; namespace CrupestApi.Commons.Crud; -// TODO: Register this. public class CrudService<TEntity> : IDisposable where TEntity : class { protected readonly TableInfo _table; @@ -38,4 +37,10 @@ public class CrudService<TEntity> : IDisposable where TEntity : class { _dbConnection.Dispose(); } + + public List<TEntity> GetAll() + { + var result = _table.Select<TEntity>(_dbConnection, null); + return result; + } } |