コード例 #1
0
ファイル: PersonMap.cs プロジェクト: secc/RockDataImport
        public Dictionary<string, object> GetByForeignId( string foreignId, bool includeAlias = false )
        {
            PersonController controller = new PersonController( Service );
            Person person = controller.GetByForeignId( foreignId, true );
            Dictionary<string, object> personDictionary = ToDictionary( person );

            if ( person != null && includeAlias )
            {
                PersonAlias primaryAlias = GetPrimaryAlias( person.Id );
                if(primaryAlias != null)
                {
                    personDictionary.Add( "PrimaryAliasId", primaryAlias.Id );
                }

            }

            return personDictionary;
        }