public async Task <object> LastLocation(Guid sheepId) { var viewer = TrackerConnectionFactory.CreateLocationViewer(); var location = await(viewer.GetLastSheepLocation(sheepId)); return(location == null ? null : new { Latitude = location.Value.Key, Longitude = location.Value.Value }); }
public async Task <object> LastLocation(Guid orderId) { var viewer = TrackerConnectionFactory.CreateLocationViewer(); var location = await viewer.GetLastReportingLocation(orderId); if (location == null) { return(null); } return(new { Latitude = location.Value.Key, Longitude = location.Value.Value }); }
public async Task <DateTime?> LastSeen(Guid sheepId) { var viewer = TrackerConnectionFactory.CreateLocationViewer(); return(await viewer.GetLastReportTime(sheepId)); }