I have two entities in a many to many relationship
I'd like to save one entity and several related entities.
I have this code
IEnumerable<ProjectMembersEntity> projectMembers = GetProjectMembers();
var project = new ProjectsEntity();
foreach (var entity in projectMembers )
{
project.ProjectMembersCollectionViaProjectsMembersProject.Add(entity);
}
adapter.SaveEntity(project);
but there's an error when adding ProjectMembers entities to the ProjectMembersCollectionViaProjectsMembersProjectcollection which says the collection is only readonly.
How Am I supposed to save the entities in one go ?