public void Add(NotFoundRequest notFoundRequest) { if (!_requests.ContainsKey(notFoundRequest.Path)) { _requests.Add(notFoundRequest.Path, notFoundRequest); } }
public void Update(NotFoundRequest notFoundRequest) { if (_requests.ContainsKey(notFoundRequest.Path)) { _requests[notFoundRequest.Path] = notFoundRequest; } }
public void Update(NotFoundRequest notFoundRequest) { var lowerPath = notFoundRequest.Path; if (_requests.ContainsKey(lowerPath)) { _requests[lowerPath] = notFoundRequest; } }
public void Record(string path) { lock (_lock) { var request = _repo.GetByPath(path); if (request != null) { request.IncrementCount(); } else { request = new NotFoundRequest(path); request.IncrementCount(); _repo.Add(request); } } }
public void Record(string path) { string lowerPath = path.ToLowerInvariant(); lock (_lock) { var request = _repo.GetByPath(lowerPath); if (request != null) { request.IncrementCount(); } else { request = new NotFoundRequest(lowerPath); request.IncrementCount(); _repo.Add(request); } } }
public void UpdateRequest(NotFoundRequest request) { _repo.Update(request); }
public void Add(NotFoundRequest notFoundRequest) { _dbContext.NotFoundRequests.Add(notFoundRequest); _dbContext.SaveChanges(); }
public void Update(NotFoundRequest notFoundRequest) { _dbContext.Entry(notFoundRequest).State = EntityState.Modified; _dbContext.SaveChanges(); }