Questions tagged [wcf-data-services-client]

Any application can interact with an Open Data Protocol (OData)-based data service if it can send an HTTP request and process the OData feed that a data service returns. This interoperability enables you to access OData-based services from a broad range of Web-enabled applications. WCF Data Services includes client libraries that provide a richer programming experience when you consume OData feeds from .NET Framework or Silverlight-based applications.

The two main classes of the client library are the DataServiceContext class and the DataServiceQuery class. The DataServiceContext class encapsulates operations that are supported against a specified data service. Although OData services are stateless, the context is not. Therefore, you can use the DataServiceContext class to maintain state on the client between interactions with the data service in order to support features such as change management. This class also manages identities and tracks changes. The DataServiceQuery class represents a query against a specific entity set.

This section describes how to use client libraries to access and change data from a .NET Framework client application. For more information about how to use the WCF Data Services client library with a Silverlight-based application, see WCF Data Services (Silverlight). Other client libraries are available that enable you to consume an OData feed in other kinds of applications. For more information, see the OData SDK.

Read more in the ref.

33 questions
0
votes
1 answer

How can I use DataServiceContext to call an unbound action accepting an entity-reference parameter?

My OData v4 client uses generated classes based on the 6.x version of Microsoft.OData.Client. Now it needs to call an action with the following definition:
0
votes
1 answer

Retry logic with multiple methods

I am implementing retry logic for WCF services on the client side. I have multiple operations in WCF service with various input parameters and return types. I created a wrapper that can make a call to these certain methods that have no return…
Deepak
  • 23
  • 2
  • 7
0
votes
1 answer

OData-Client: How to Reset Link on new entity

I consume a OData-Service with the WCF OData client. In my application when an entity is created, a linked property is set by default to an object: var defaultPackage = _service.GetDefaultPackage(); var newCar = new Car { Key = "Unique…
scher
  • 1,813
  • 2
  • 18
  • 39
0
votes
1 answer

Getting Custom Column from IQueryable DB First Approach EF

I am working on Database First Approach in Entity Framework where I have to retrieve specific columns from the Entity. Public IQueryable GetEmployeeName(String FName,String LName) { var query = (from s in Employees …
0
votes
1 answer

Using AttachTo with a Contained EntitySet

I have some classes defined as below: public class Table { [Key] public string Name { get; set; } [Contained] public IList Entities { get; set; } } public class TableEntity { [Key] public string Partition {…
0
votes
1 answer

Consuming WCF Data Service EF , Failed to SaveChange()

I am consuming WCF Data Service as Following: DataMan.ContextWrapper context = new DataMan.ContextWrapper(new Uri("http://localhost:2060/PCM/DataMan.svc/rest/")); DataMan.Report newReport = DataMan.Report.CreateReport("123123123123",…
Aria
  • 3,724
  • 1
  • 20
  • 51
0
votes
0 answers

Consume a WCF Data Service without adding a service reference

How can I consume a WCF Data Service without adding a Service Reference. For a normal WCF service, we use shared contracts and create proxy at runtime to call the service. Is similar concept possible in case of Data Service?
Shikhar
  • 43
  • 1
  • 8
0
votes
1 answer

LoadAsync doesn't work in windows phone 8 with WCF data service

My friend and I just created a WCF data service and would like to consume it with a Windows Phone 8 client. For the WCF data service part, the OData is proved to work with a windows form project which an do CRUD for the database. So to get WP8…
0
votes
1 answer

Support compression in .NET OData 4 Client

Problem I have added support for http compression in our self-hosted OWIN/Katana Web API OData 4 service but I do not see how to support compression in the .NET client. I'm using OData libraries v6.5.0 and I need to support…
0
votes
1 answer

Data services client async load DataGridView

I have a Web API Odata service that I am working on. The controller supports async but I can't seem to find any good examples on how to load a DataGridView async while pulling data from the OData service. I did find this link which has me some what…
0
votes
1 answer

WCF Data services SaveChanges not firing WritingEntity event

I am using WCF data services (5.6 now) and since Enums are not supported (and for other reasons), I have some additional properties added to the client side classes that I intend to remove during SaveChanges using the WritingEntity event following…
reckface
  • 5,678
  • 4
  • 36
  • 62
0
votes
0 answers

How do I workaround "the type 'full.name' has no settable properties" in a WCF Data Services client?

I'm using WCF Data Services 5.6 with custom entity classes, and successfully reading data into entities which inherit from Catel's ModelBase. However, when I try to perform an insert or update back, the reflection used by Data Service fails on one…
0
votes
1 answer

Malformed Request (WCF Data Service)

I used WCF Data Service for CRUD operations. I have one remote service and many clients (computers). Some client reseived error on all edit operation (context have entity and we edit it now). Returned exception contains next message:"Your Browser…
Peter Barbanyaga
  • 496
  • 7
  • 16
0
votes
1 answer

WCF. How to add custom DataContact types to WCF Client reference?

I have a WCF service with method: [OperationContract] public bool TestCustomRequest(RequestBase request) { return true; } In referenced Class Library project I have 2 classes: [DataContract] public abstract class RequestBase { [DataMember] …
Sergejs
  • 2,540
  • 6
  • 32
  • 51
0
votes
1 answer

Visual Studio Express 2012 for Web: Creating Service Reference to WCF Data Service 5.0.0.0 Causes Custom Tool Error

At least in Visual Studio Express 2012 for Web, when creating a Service Reference to a WCF Data Services 5.0.0.0 service with truly RESTful URL (routed properly without the .svc URI or file): You need to add /$metadata to the service URL to get the…