public DapperRepository(ISoftDeleteQueryFilter softDeleteQueryFilter, ILogger <DapperRepository <TEntity, TPrimaryKey> > logger) { _softDeleteQueryFilter = softDeleteQueryFilter; _logger = logger; _creationActionFilter = ServiceLocator.GetService <IAuditActionFilter <TEntity, TPrimaryKey> >(typeof(CreationAuditDapperActionFilter <TEntity, TPrimaryKey>).Name); _modificationActionFilter = ServiceLocator.GetService <IAuditActionFilter <TEntity, TPrimaryKey> >(typeof(ModificationAuditDapperActionFilter <TEntity, TPrimaryKey>).Name); _deletionAuditDapperActionFilter = ServiceLocator.GetService <IAuditActionFilter <TEntity, TPrimaryKey> >(typeof(DeletionAuditDapperActionFilter <TEntity, TPrimaryKey>).Name); }
public DapperRepository(ISoftDeleteQueryFilter softDeleteQueryFilter, ILogger <DapperRepository <TEntity, TPrimaryKey> > logger) { _softDeleteQueryFilter = softDeleteQueryFilter; _logger = logger; _creationActionFilter = ServiceLocator.GetService <IAuditActionFilter <TEntity, TPrimaryKey> >(typeof(CreationAuditDapperActionFilter <TEntity, TPrimaryKey>).Name); _modificationActionFilter = ServiceLocator.GetService <IAuditActionFilter <TEntity, TPrimaryKey> >(typeof(ModificationAuditDapperActionFilter <TEntity, TPrimaryKey>).Name); _deletionAuditDapperActionFilter = ServiceLocator.GetService <IAuditActionFilter <TEntity, TPrimaryKey> >(typeof(DeletionAuditDapperActionFilter <TEntity, TPrimaryKey>).Name); isUserSearchElasitcModule = DbSetting.Instance.UseElasicSearchModule; if (isUserSearchElasitcModule) { _creationElasitcFilter = ServiceLocator.GetService <IElasticFilter <TEntity, TPrimaryKey> >(typeof(CreationElasticFilter <TEntity, TPrimaryKey>).Name); _modificationElasitcFilter = ServiceLocator.GetService <IElasticFilter <TEntity, TPrimaryKey> >(typeof(ModificationElasticFilter <TEntity, TPrimaryKey>).Name); _deletionElasitcFilter = ServiceLocator.GetService <IElasticFilter <TEntity, TPrimaryKey> >(typeof(DeletionElasticFilter <TEntity, TPrimaryKey>).Name); } }