public long DeleteEntities <T>(Func <StatelessSessionWrapper, DateTime, long> deleteFunc) where T : class { var entityName = Storage.GetTableName <T>(); Logger.DebugFormat("Removing expired rows from table '{0}'", entityName); return(Storage.UseStatelessSession(session => { var removedCount = deleteFunc(session, Storage.UtcNow); Logger.DebugFormat("Removed {0} expired rows from table '{1}'", removedCount, entityName); return removedCount; })); }
public CountersAggregator(FluentNHibernateJobStorage storage) { _storage = storage ?? throw new ArgumentNullException(nameof(storage)); _tableName = _storage.GetTableName <_Counter>(); }