using System.Collections.Generic; using System.Linq; using ET; namespace cfg.GfgCfg { public partial class SuitCfg { private Dictionary> _suitCfgPartsDic = new Dictionary>(); public List Parts { get { _suitCfgPartsDic.TryGetValue(Id, out var outList); if (outList == null || outList.Count == 0) { var list = CommonDataManager.Tables.TblItemCfg.DataList .Where(a => a.ItemType == ConstItemType.DRESS_UP && a.SuitId == Id).ToList(); outList = list != null ? list.Select(a => a.Id).ToList() : new List(); _suitCfgPartsDic[Id] = outList; } return outList; } } } }