Posted on 2004-10-20
I am after some advice, I am developing an application which contains quite a few link tables. Here is an exmaple of such a link.
A user can be a member of multiple branches.
Thefore I have a User, Branch and UserBranch table
I have Info Classes which represent the entities such as User and Branch. Each data class returns its own set of Info entities. (Such as UsersDB class - Method GetUsers - Returns All Users in an array of User Info's) Say I am putting on a new user, the operator can add multiple branches to a list box. I then save these by way of the users db class (is this the best way, for exmaple pass along an array of branches). However if the record has already been previously saved is it better to remove the existing entries from the link table before adding new ones.