I have a table with multiple email addresses from one person - So EACH email address is listed several times in this table.
I would like to make it Distinct
- so every email address is listed one.
My table has a relationship from the Customers table to the Customer Email address collection table
Customers.CustomerEmails.Where(Function(e) e.EmailId = EmailID).OrderBy(Function(o) o.CustomerId).Distinct()
I added a Distinct
to the end of the statement but this didn't work. I have added Distinct
after each method but that doesn't work either.
I then tried to add the order by at a different location in case this is causing some issues but again that didn't help either.
Does anyone know what I'm doing wrong here?