diff options
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; + } } |