diff options
author | crupest <crupest@outlook.com> | 2022-12-12 20:30:55 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-12-20 20:32:53 +0800 |
commit | d8f12e14f3cebd759a8ee911cabb9585063606cb (patch) | |
tree | 5612df6f003faeb2b39c063c7fb3b09c7acb7e4a /docker/crupest-api/CrupestApi/CrupestApi.Commons/Crud/CrudService.cs | |
parent | ce8adb2c5ff7d71592a4173eb06391b01cc45f22 (diff) | |
download | crupest-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.cs | 6 |
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)) |