2

我在我的可移植类库(PCL)中使用 Simple.OData.Client 库 3.3.0从我的 OData v3 服务中检索数据。而且我确信我的服务工作正常。当我尝试检索 Units 的集合时,它返回给我 {Simple.OData.Client.ResponseReader} 但不是我预期的IEnumarable<IDictionary<string,object>>集合。这是代码:

    public TajirODataService()
    {
        client = new ODataClient ("http://192.168.0.139/t/tajir3service.svc/");
    }

    public async void InitUnits()
    {
        var units = await client.FindEntriesAsync ("Items_Unit");
        foreach (var item in units) {

        }
    }

请帮助我很困惑,不知道从哪里得到我的收藏

4

1 回答 1

2

这很奇怪,因为 ResponseReader 是一个不应向客户端公开的内部类。但是现在 Simple.OData.Client 4.0 发布了,我建议你升级。它有大量新功能(支持 V4 和 JSON 有效负载)和几个错误修复。

注意!如果您正在使用 iOS 应用程序,请确保您引用了正确的适配器,更多信息请点击此处:https ://vagifabilov.wordpress.com/2014/11/03/resolving-filenotfoundexception-when-using-simple-odata-client-在-ios-应用程序/

于 2014-12-09T10:51:25.103 回答