aboutsummaryrefslogtreecommitdiff
path: root/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-12-12 20:30:55 +0800
committercrupest <crupest@outlook.com>2022-12-20 20:32:53 +0800
commitd8f12e14f3cebd759a8ee911cabb9585063606cb (patch)
tree5612df6f003faeb2b39c063c7fb3b09c7acb7e4a /docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs
parentce8adb2c5ff7d71592a4173eb06391b01cc45f22 (diff)
downloadcrupest-d8f12e14f3cebd759a8ee911cabb9585063606cb.tar.gz
crupest-d8f12e14f3cebd759a8ee911cabb9585063606cb.tar.bz2
crupest-d8f12e14f3cebd759a8ee911cabb9585063606cb.zip
Develop secret api. v31
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, 3 insertions, 3 deletions
diff --git a/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs b/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs
index f0af62a..7944c18 100644
--- a/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs
+++ b/docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs
@@ -10,15 +10,15 @@ public class CrudService<TEntity> : IDisposable where TEntity : class
protected readonly TableInfo _table;
protected readonly string? _connectionName;
protected readonly IDbConnection _dbConnection;
- protected readonly EntityJsonHelper _jsonHelper;
+ protected readonly EntityJsonHelper<TEntity> _jsonHelper;
private readonly ILogger<CrudService<TEntity>> _logger;
- public CrudService(string? connectionName, ITableInfoFactory tableInfoFactory, IDbConnectionFactory dbConnectionFactory, ILoggerFactory loggerFactory)
+ public CrudService(string? connectionName, ITableInfoFactory tableInfoFactory, IDbConnectionFactory dbConnectionFactory, EntityJsonHelper<TEntity> jsonHelper, ILoggerFactory loggerFactory)
{
_connectionName = connectionName;
_table = tableInfoFactory.Get(typeof(TEntity));
_dbConnection = dbConnectionFactory.Get(_connectionName);
- _jsonHelper = new EntityJsonHelper(_table);
+ _jsonHelper = jsonHelper;
_logger = loggerFactory.CreateLogger<CrudService<TEntity>>();
if (!_table.CheckExistence(_dbConnection))