I have an application where a user can upload files and associate the files with a project. The projects can be duplicated. Here is an example of an object:
Public class Project{
Int ProjectId{get; set;}
string ProjectName{get;set;}
List<int> FileIds{get;set}
}
When I go to duplicate the project, say, what is the best way to associate the same files with a new project? I have two tables for projects and files. I have a relational table that has foreign keys to the project id and the file ids. When I create a new project id I want to bulk insert the file ids into the relational table. Is it just as good to iterate through the List and inert one at a time or is there a better way?