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 | 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)) |