コード例 #1
0
ファイル: MembersDAO.cs プロジェクト: jkchua/MPAOrganizer
        /// <summary>
        /// Method that retrieves all the characters of the specific member.
        /// </summary>
        /// <param name="memberId">The record ID of the member of SpoonedByUs.</param>
        /// <returns></returns>
        public List<MemberCharacter> GetCharactersByMemberId(long memberId)
        {
            var data = service.GetCharactersByMemberId(memberId);
            
            List<MemberCharacter> characters = new List<MemberCharacter>();

            foreach (var item in data)
            {
                MemberCharacter character = new MemberCharacter()
                {
                    Id = item.Id,
                    MemberId = item.MemberId,
                    CharacterName = item.CharacterName
                };

                characters.Add(character);
            }

            return characters;
        }
コード例 #2
0
ファイル: MembersDAO.cs プロジェクト: jkchua/MPAOrganizer
        /// <summary>
        /// Method that retrieves the primary character details of the specific member.
        /// </summary>
        /// <param name="memberId">The record ID of the member of SpoonedByUs.</param>
        /// <returns></returns>
        public MemberCharacter GetPrimaryCharacterByMemberId(long memberId)
        {
            var data = service.GetPrimaryCharacterById(memberId);

            MemberCharacter primaryCharacter = new MemberCharacter()
            {
                Id = data.Id,
                MemberId = data.MemberId,
                CharacterName = data.CharacterName
            };
            
            return primaryCharacter;
        }