这里的情节 - 我想获得不同的坐标列表,对于每对坐标,我想从他们放置的行中选择MIN日期。
我尝试执行该查询,但是我得到方法或操作未实现异常。那么,我该如何解决呢?
var q = (from x in Session.Query<MyTable>()
where x.UserID == 1
group x by new { x.Longitude, x.Latitude } into cords
select new
{
an exception -> date = (from y in Session.Query<MyTable>()
where y.UserID == 1
&&
cords.Key.Latitude == y.Latitude
&&
cords.Key.Longitude == y.Longitude
orderby y.AddedDate ascending
select y.AddedDate
), // maybe add .FirstOrDefault() ?
lng = cords.Key.Longitude,
lat = cords.Key.Latitude
}
)
.ToList();