public void Register(Volunteer volunteer, IList<JobRole> jobRoles, IList<Technology> technologies) { foreach (var jobRole in jobRoles) { var volunteerJobRole = new VolunteerJobRole { Volunteer = volunteer, JobRoleID = jobRole.JobRoleID, VolunteerID = volunteer.VolunteerID }; } foreach (var technology in technologies) { var volunteerTechnology = new VolunteerTechnology() { Volunteer = volunteer, TechnologyID = technology.TechnologyID, VolunteerID = volunteer.VolunteerID }; } _datacontext.Volunteers.InsertOnSubmit(volunteer); }
private void detach_VolunteerJobRoles(VolunteerJobRole entity) { this.SendPropertyChanging(); entity.JobRole = null; }
partial void DeleteVolunteerJobRole(VolunteerJobRole instance);
partial void UpdateVolunteerJobRole(VolunteerJobRole instance);
partial void InsertVolunteerJobRole(VolunteerJobRole instance);
private void attach_VolunteerJobRoles(VolunteerJobRole entity) { this.SendPropertyChanging(); entity.Volunteer = this; }