var qGroup = from dispatch in _dispatchRepository.GetAll() group dispatch by dispatch.DeviceId into g select g.Key + "_" + g.Max(d => d.BeginTime); var query = from dispatch in _dispatchRepository.GetAll() where qGroup.Contains(dispatch.DeviceId + "_" + dispatch.BeginTime) select dispatch;
时间: 2024-11-12 22:00:32