wcf-data-services-client

How do I extract ETAG from a WCF Dataservices response?

◇◆丶佛笑我妖孽 提交于 2019-12-11 07:58:16
问题 I've been trying to get an answer to this question for quite some time. Since the WCF Dataservice isn't thread safe, and often it needs to be recreated, once I query my datastore for a record, how do I extract the ETAG from that response so I can use it when I reconstruct my datacontext? 回答1: That depends on which language/library you're using on the client and which format you're using on the wire (ATOM vs JSON). The ETag is stored in the payload and in case of a single entity payload also

Proper way to call nested Expand() from .NET OData 4 Client

北战南征 提交于 2019-12-09 10:26:57
问题 Problem In an OData 4 service on Web API, what is the proper way to call nested $expand from a .NET client? We are using the OData Client Generator. Back in the prior WCF Data Services with OData 3 service we could call .Expand("Customers/Orders") . In Web API with OData 4 we can no longer do so and receive the following should you attempt .Expand("Customers/Orders") : The query specified in the URI is not valid. Found a path traversing multiple navigation >properties. Please rephrase the