Linq to Entities queries are translated to SQL, but there is no way to translate the logic of your custom comparer to SQL, so the comparison has to be done in memory. You could do something like that:
if (!db.Customers.AsEnumerable().Contains<Customer>(customer,customerCompairor))
But it would load each customer in memory before comparing it to the customer
variable, which is probably not a very good idea...
If you can, try to express the comparison logic as an inline Linq expression, e.g.:
if (!db.Customers.Any(c => c.Id == customer.Id && c.Name == customer.Name))