Simple.OData.Client不返回结果,没有错误

时间:2019-06-11 21:19:46

标签: c# odata simple.odata.client

我正在尝试使用Simple.OData.Client库从OData V2服务读取数据,但是经过数小时的梳理,我的成功率为零。

pacc_leapaccess_access_log

运行此代码在控制台中仅产生SELECT al.* FROM `access_log` AS `al` LEFT JOIN `pacc_leapaccess_rooms` AS `r` ON al.room_id = r.id INNER JOIN ( SELECT user_id, room_id, min(created) AS min_date FROM `access_log` WHERE `user_id` != 0 GROUP BY user_id, room_id) AS al2 ON al.user_id = al2.user_id AND al.room_id = al2.room_id AND al.created = al2.min_date WHERE `al`.`created` >= '2019-06-09 00:00:00' AND `al`.`created` <= '2019-06-12 23:59:59'; SELECT al.* FROM `access_log` AS `al` LEFT JOIN `pacc_leapaccess_rooms` AS `r` ON al.room_id = r.id INNER JOIN ( SELECT user_id, room_id, max(created) AS max_date FROM `access_log` WHERE `user_id` != 0 GROUP BY user_id, room_id) AS al2 ON al.user_id = al2.user_id AND al.room_id = al2.room_id AND al.created = al2.max_date WHERE `al`.`created` >= '2019-06-09 00:00:00' AND `al`.`created` <= '2019-06-12 23:59:59'; ,不打印其他任何内容,并且不会引发任何异常。由于某些原因,第二个打印语句也无法工作...但是为什么呢?

我完全不知道为什么它不起作用。

这实际上是《入门指南》中的代码的副本:https://github.com/simple-odata-client/Simple.OData.Client/wiki/Getting-started-with-Simple.OData.Client

有人可以帮我解决这个问题吗?

0 个答案:

没有答案