IList<Object[]>取数问题(NHibernate)

我如何将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);
  }

慕莱坞森
浏览 250回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP