Given 2 tables:
Person
PersonsFavoriteColors
A person can have one or more favorite colors. These colors are updated with a multi-select control (CheckBoxList, ListBox w/ multi-select enabled).
In the past, if I am updating the person's colors, I'd:
- Start Transaction
- Delete all color records for the person
- Insert records for each selected color
- Commit Transaction
Is this the standard and best practice for handling multi-select controls that add / update / delete records in "to-many" child tables?
Thanks!