private List <SkillView> GetSkillList(T_Trait trait)
        {
            var skillList    = new List <SkillView>();
            var sqlskillList = skillRepository.GetList(trait.Id);

            foreach (var item in sqlskillList)
            {
                skillList.Add(GetSkillView(item));
            }
            return(skillList);
        }
        private TraitView GetView(T_Trait trait)
        {
            var attributList = new List <IDValueView <CharakterAttribut> >();
            var sqlAttribut  = attributRepository.GetList(trait.Id);

            foreach (var item in sqlAttribut)
            {
                attributList.Add(new IDValueView <CharakterAttribut>
                {
                    ID    = (CharakterAttribut)item.AttributID,
                    Value = item.Value,
                    Name  = Enum.GetName(typeof(CharakterAttribut), item.AttributID),
                });
            }

            var resourceList = new List <IDValueView <string> >();
            var sqlresource  = resourceRepository.GetList(trait.Id);

            foreach (var item in sqlresource)
            {
                var innerType = DSAUtil.GetType(item.Type);
                var innerItem = this.charakter.Resources.GetByType(innerType);

                resourceList.Add(new IDValueView <string>
                {
                    ID    = item.Type,
                    Value = item.Value,
                    Name  = innerItem.Name
                });
            }

            var valueList = new List <IDValueView <string> >();
            var sqlvalue  = valueRepository.GetList(trait.Id);

            foreach (var item in sqlvalue)
            {
                var innerType = DSAUtil.GetType(item.Type);
                var innerItem = this.charakter.Values.GetItemByType(innerType);

                valueList.Add(new IDValueView <string>
                {
                    ID    = item.Type,
                    Value = item.Value,
                    Name  = innerItem.Name
                });
            }

            var talentList    = new List <TalentView>();
            var sqltalentList = talentRepository.GetList(trait.Id);

            foreach (var item in sqltalentList)
            {
                var talentGuid = new Guid(item.TalentID);
                var talent     = charakter.Talente.Get(talentGuid);
                talentList.Add(new TalentView()
                {
                    ID   = talentGuid,
                    AT   = item.AT,
                    PA   = item.PA,
                    BL   = item.BL,
                    TAW  = item.TAW,
                    Name = talent.Name
                });
            }

            var view = new TraitView
            {
                ID          = trait.Id,
                APGain      = trait.APGain,
                APInvest    = trait.APInvested,
                Description = trait.Description,
                GP          = trait.GP,
                Name        = trait.Name,
                Type        = (TraitType)trait.Type,
                Value       = trait.Value,

                ModifyDate   = trait.ModifyDate,
                CreationDate = trait.CreationDate,

                AttributList = attributList,
                ResourceList = resourceList,
                TalentList   = talentList,
                ValueList    = valueList,
                SkillList    = GetSkillList(trait)
            };

            view.LongDescription = this.GenerateLongDescription(view);
            return(view);
        }