C# 中Lambda中的的匿名函数


        /// 
        /// 根据设备号,获取故障列表
        /// 
        /// 主键
        /// 
        [HttpGet]
        public async Task GetItemPageList(string scanCode)
        {
            //var ht_mes_EquipmentRepairR = await _iEquipmentRepairRBLL.GetEquipmentFailureMByCode(scanCode);
            var ht_mes_EquipmentRepairRItem = await _iEquipmentRepairRBLL.GetEquipmentFailureItemMByCode(scanCode);
            if (ht_mes_EquipmentRepairRItem == null)
            {
                return Success(null);
            }
            var jsonData = new
            {
                Data = ht_mes_EquipmentRepairRItem.Select(p=> {
                    return new
                    {
                        FaultCode = p.F_Id,
                        FaultDescription = p.Content
                    };
                }),
 
            };
            return Success(jsonData);
        }

 Data = ht_mes_EquipmentRepairRItem.Select(p=> {
                    return new
                    {
                        FaultCode = p.F_Id,
                        FaultDescription = p.Content
                    };

                }),

你可能感兴趣的:(java,前端,javascript)