0
鑑於下面的表格結構,您如何僅用nhibernate投影x和y?你如何列出結果,結果列表的類型是什麼?如何只投影兩列並列出它們? (Nhibernate)
//Table structure, mapped in the traditional way
FunnyTable {
x [int] NOT NULL,
y [int] NULL,
z [int] NOT NULL
}
//assume criteria is set somewhere else
ProjectionList list = Projections.ProjectionList()
.Add(Projections.Property("x"))
.Add(Projections.Property("y"));
return criteria.SetProjection(list).List<???>??