I am writing a LINQ query to get the queues of an agent and then removing rows that match a specific criteria but the web page displays the entire list.
var agentQueues = _context.AgentQueues.Where(e => e.AgentId == Request.AgentId)
.OrderByDescending(e => e.ScheduleTime)
.ThenBy(e => e.AgentQueueId)
.ToList();
agentQueues.RemoveAll(e => !e.Status.Equals("Waiting") && !e.Status.Equals("Running") && !e.Deleted==false);
Even though I am writing RemoveAll, the query still displays rows that contain Statuses other than 'Running' and 'Waiting'. It would be great if anyone could point me to the right direction here.