I have 2 generic lists.
List 1 is populated with products from a database and List 2 is populated with products from a webservice.
I am wanting to compare lists and any values that are not in List 2 add them to List 3.
I have tried
List<ProductModel> productsToAdd = productsInDatabase.Except(productsFromService).ToList();
However all results are displayed even tho product already is in the database.
What am I doing wrong? do I need to somehow use Except but use an Id field?
Use overloaded version of Except method and pass equality comparer: MSDN