public static TeamMemberV2 CreateTeamMemberV2(string teamMemberPartyNumber,
                                                      string teamName,
                                                      global::System.DateTimeOffset validFrom,
                                                      global::System.DateTimeOffset validTo,
                                                      global::Microsoft.Dynamics.DataEntities.Person teams,
                                                      global::Microsoft.Dynamics.DataEntities.TeamV2 team)
        {
            TeamMemberV2 teamMemberV2 = new TeamMemberV2();

            teamMemberV2.TeamMemberPartyNumber = teamMemberPartyNumber;
            teamMemberV2.TeamName  = teamName;
            teamMemberV2.ValidFrom = validFrom;
            teamMemberV2.ValidTo   = validTo;
            if ((teams == null))
            {
                throw new global::System.ArgumentNullException("teams");
            }
            teamMemberV2.Teams = teams;
            if ((team == null))
            {
                throw new global::System.ArgumentNullException("team");
            }
            teamMemberV2.Team = team;
            return(teamMemberV2);
        }
 partial void OnTeamChanging(global::Microsoft.Dynamics.DataEntities.TeamV2 value);