我有一个实体,除了其他信息外,还有许多图像。这是1个2多个。在我需要首先从集合加载到加载速度较慢情况下,我有以下检索图像集合的查询。
List<Entity> data = session.Query<Entity>()
.Fetch(x=>x.Photos)//here I need only first element
.Fetch(x=>x.Features)
.ToList();发布于 2012-05-28 18:54:48
List<Entity> data = session.Query<Entity>()
.Fetch(x=>x.Photos.FirstOrDefualt())//here I need only first element
.Fetch(x=>x.Features)
.ToList();https://stackoverflow.com/questions/10783424
复制相似问题