private static bool IsEntryExpired(FbConnection connection, FirebirdStorageOptions options, int entryId) { var count = connection.Query<long>(string.Format(@" SELECT COUNT(*) FROM ""{0}.COUNTER"" WHERE id = @id;", options.Prefix), new { id = entryId }).Single(); return count == 0; }