我正在閱讀 cosmos db 檔案 https://3c5.com/DQRpv
有幾個例子說這樣的話
input.Select(family => family.parents[0].familyName);
其中輸入是物件的 IQueryable。
我的問題是如何獲得物件的 IQueryable 但是?
uj5u.com熱心網友回復:
您可以嘗試以下操作:
Container container = await this.database.CreateContainerIfNotExistsAsync(containerId, "<partitionkeypath>");
var input = this.container.GetItemLinqQueryable<Family>();
input.Select(family => family.parents[0].familyName);
其中 Family 是定義為與容器屬性映射的類。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/381799.html
標籤:林克 azure-cosmosdb
上一篇:Linq:選擇不同的物件左連接
