public static List <Route> GetRoutesToUpdate(List <Route> existingRoutes, List <Route> routes) { var comparer = DeepEqualityComparer.CraeteDefaultWithLogOnlyNotEqualToConsole <Route>(); return(existingRoutes.Except(routes, comparer) .Union(routes.Except(existingRoutes, comparer)) .ToList()); }