我如何将Id,FirstName字段取出?public IList<Object[]> SelectObject() { return Session.CreateQuery("select c.Id, c.FirstName from Customer c").List<Object[]>(); }[Test] public void GetSelectObject() { var cust = _simple.SelectObject(); Assert.AreEqual(6, cust.Count); string s = ""; foreach(object obj in cust) { s = s + ..............//我如何将Id,FirstName字段取出? } Assert.AreEqual("1李2李3张4张5张6张", s); }
1 回答
- 1 回答
- 0 关注
- 249 浏览
添加回答
举报
0/150
提交
取消