我想動態獲取列。在NHibernate中,我可以這樣做:在Linq中投影到SQL和Linq到實體
var list = _session.CreateCriteria(typeof(Person))
.SetProjection(Projections.ProjectionList()
.Add(Projections.Property("FirstName"))
.Add(Projections.Property("LastName"))
.Add(Projections.Property("Jersey"))
.Add(Projections.Property("FortyYard"))
.Add(Projections.Property("BenchReps"))
.Add(Projections.Property("VertJump"))
.Add(Projections.Property("ProShuttle"))
.Add(Projections.Property("LongJump"))
.Add(Projections.Property("PersonSchoolCollection"))
)
.SetResultTransformer(new NHibernate.Transform.AliasToBeanResultTransformer(typeof(Person)))
.List<Person>();
Linq中的等效項是什麼?