public static OpenNexus.MDM.Contracts.PartyRole CreateContractForEntityCreation()
        {
            var contract = new OpenNexus.MDM.Contracts.PartyRole();

            AddDetailsToContract(contract);
            return(contract);
        }
        private static void AddDetailsToContract(OpenNexus.MDM.Contracts.PartyRole contract)
        {
            var entity = ObjectMother.Create <PartyRole>();

            repository.Add(entity);
            repository.Flush();

            contract.PartyRoleType = entity.PartyRoleType;
            contract.Details       = new PartyRoleDetails()
            {
                Name = entity.LatestDetails.Name,
            };

            contract.Party = entity.Party.CreateNexusEntityId(() => "");
        }
 public static OpenNexus.MDM.Contracts.PartyRole CreateContractForEntityCreation()
 {
     var contract = new OpenNexus.MDM.Contracts.PartyRole();
     AddDetailsToContract(contract);
     return contract;
 }
 public static OpenNexus.MDM.Contracts.PartyRole MakeChangeToContract(OpenNexus.MDM.Contracts.PartyRole currentContract)
 {
     AddDetailsToContract(currentContract);
     currentContract.MdmSystemData.StartDate = currentContract.MdmSystemData.StartDate.Value.AddDays(2);
     return(currentContract);
 }