void Build(int UID) { var _db = new PangyaEntities(); foreach (var info in _db.ProcGetCardEquip(UID)) { var cardequip = new PlayerCardEquipData() { ID = (uint)info.ID, CID = (uint)info.CID, CHAR_TYPEID = (uint)info.CHAR_TYPEID, CARD_TYPEID = (uint)info.CARD_TYPEID, SLOT = (byte)info.SLOT, FLAG = (byte)info.FLAG, REGDATE = (DateTime)info.REGDATE, ENDDATE = (DateTime)info.ENDDATE, VALID = 1, NEEDUPDATE = false }; AddCard(cardequip); } }