错误 1 无法将类型“System.Collections.Generic.IEnumerable<Langben.DAL.KaoQingGuanLi>”隐式转换为“System.Collections.Generic.List<Langben.DAL.KaoQingGuanLi>”。存在一个显式转换(是否缺少强制转换?) D:\最终 - 副本\App\Controllers\KaoQingGuanLiController.cs 60 45 App
调试欢乐多
List<int> list = new List<int>();
list.Add(11111);
List<int> newList = list.Where(x => x == 11111).ToList<int>();
编译器告诉你了,转换成List就好了嘛,最后加个ToList()
List<KaoQingGuanLi> queryData = m_BLL.GetByParam(id, page, rows, order, sort, search, ref total).Where(w=>w.YuanGongXingXi.SysDepartmentId==id)ToList()
.GetByParam(id, page, rows, order, sort, search, ref total)
.Where(w=>w.YuanGongXingXi.SysDepartmentId==id)
.ToList()