public void RecordRequest(string requestPath) { var existingEntry = Entries.FirstOrDefault(e => e.Path == requestPath); if (existingEntry != null) { existingEntry.Count++; return; } var newEntry = new RequestEntry() { Path = requestPath, Count = 1 }; Entries.Add(newEntry); }