I think I am putting my question correctly :)
I am querying the database using LINQ to retrieve some data. Please find the code below.
var leadtasktype = _context.LeadTypeTaskTypes.Where(l => l.LeadTypeId == item.Value);
foreach(LeadTypeTaskType l in leadtasktype){
if (l.TaskTypeId == 21)
{
//I need to remove an item which has the tasktype id 21
}
}
As I mentioned in the comments, I need to remove items from the leadtasktype based on my if
condition. How do I do this?