I have a scenario where I need to update multiple records, preferably using LINQ. For example, I need to update a list of SSRS reports that a user can view. I have a many-to-many junction table setup, iw_UserSSRSReport, in the database between the iw_SSRSReport and aspnet_Membership tables (see attached screenshot).
How would I insert/update the records in the junction table? I am still in the planning stage so I haven't written any code, but I foresee an issue running into this.
Do I need to add the User Id and SSRSReport ID to a collection and pass that to a method as a parameter, and then loop through the collection and inserting the items individually, and then calling SubmitChanges()?
And how would I update? Would I have to first clear out the junction table where that user id exists, and then execute the same insert method?