I have three database tables:
- a list of cars,
- a list of people, and
- the third is the many-to-many table of people to cars.
On my winform for a person, I have a listbox of available cars. Loading that listbox from the database is easy (databinding). Is there any easy way to select what cars a person has based on the many to many table or do I have to resort to looping through the listbox and comparing it to the many to many table?
So, if I have John Doe and he owns a Ford and a Honda, and the choices in the lsitbox are Chevy, Honda, Ford, Toyota and Nissan, then only the Honda and Ford should be selected when John Doe's form is opened.
Thanks for the help!