(這涉及到微軟的SitkaSoapService,在服務引用在https://database.windows.net/soap/v1/)SQL數據服務 - 查詢空
我使用SitkaSoapServiceClient通過SOAP訪問我的SQL數據服務數據庫。
我可以在一個字符串傳遞一個LINQ語句,如查詢數據:
Scope scope = new Scope();
scope.AuthorityId = authorityId;
scope.ContainerId = containerId;
using (SitkaSoapServiceClient proxy = GetProxy())
return proxy.Query(scope, "from e in entities where e[\"FirstName\"] == \"Bob\" select e");
但是,我想不出如何查詢空屬性值(即發現實體沒有這個屬性)。
我希望能夠說:
return proxy.Query(scope, "from e in entities where e[\"FirstName\"] == null select e");
...但是,拋出一個FaultException<>
,說:「‘空’的名稱無法找到」
任何想法?
除了linq的整個點是能夠避免SQL語法... – dkretz 2009-02-26 23:00:55