Is it possible to remove duplicates from a datatable based on a specific field and a condition
Like if I have the following records:
name: Ali
appointment_type: dental
appointment_date: 8/5/2017 08:00:00
name: ali
appointment_type: dental
appointment_date: 8/5/2017 16:00:00
from the above example, the patient Ali has two appointments, I want to remove the later appointment(s) (which is on 8/5/2017 16:00:00)
in other words, remove all appointment of patient "Ali" and keep the earliest one only
is it possible to do it in LINQ?