Ok more of a conceptual question here:
Say I have an existing record of type Meeting. When I go to edit the meeting I have a listbox with all current meeting participants, and one with all employees. I then add a few employees from the master list and remove a couple from the meeting list. What is then the best approach to update my MeetingParticipant database with the new roster? The add records are no problem, but when I go to update, my callback doesn't know which items I have removed. Here are the solutions I've considered/implemented so far, but I'm hoping someone has a better answer :).
- Immediately resolve the record deletion when the employee has been removed from the list. (this is what I usually implement, but I'd rather find a way where I can simply update the entire collection upon form submission)
- Remove all MeetingParticipant records for the meeting and repopulate with the new list. (could possibly cause some referential integrity problems for employees who's status did not change)
- Iterate through each of the MeetingParticipant records, searching the new list to see if it's still on the list or not. (seems like a lot of overkill)
If it matters, we're working w/in the .Net framework using MVC & LINQ.