I have two lists namely,
List<Employee> oldEmplist and List<Employee> newEmplist and i have to compare both the list with only 2 properties of employee class namely empOrigId,empOrigNumberand these two properties will be set only for newEmplist so i have to compare these properties from newEmpList with empId,empNumber in oldEmpList. If this matches i have to replace the whole element in the oldEmpList with the matching item in the newEmplist.
Any suggestion how this can be done?