You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My company expects to implement IIS hosted Web APIs that run on app servers.
These will be called by IIS hosted web applications that run on web servers.
We can therefore use ApiControllers on the app servers and call them from
HttpClient from the web servers. I like this programming model, where we use
the same MediaTypeFormatter and extensibility points at both ends of the wire.
We expect to use EntitySetController endpoints wherever we can, for general
CRUD operations, using the JSON light format. Then fall back to ApiControllers
if we have to - for operations like IN queries that OData doesn't support.
Ideally I'd like to be able to the following. These may need to use different
wire formats (maybe JSON.Net and JSON light). However, I don't want to have to
use a DataServiceContext to call EntitySetController, since supporting two
entirely different client side programming models adds a lot of work.
Use the HttpClient to talk to an ApiController
Use the HttpClient to talk to an EntitySetController
I think I'm right in saying that the second case requires the client to use
the ODataMediaTypeFormatter, and the client needs to provide an IEdmModel via
the HttpRequestMessage.SetEdmModel method. However, I've been unable to get
this to work, with various formatter / serialization problems.
If this supported currently, and if so can anyone point me to some sample
code? Any help appreciated.
Work Item Details
Original CodePlex Issue:Issue 1140 Status: Proposed Reason Closed: Unassigned Assigned to: Unassigned Reported on: Jul 17, 2013 at 1:14 PM Reported by: GaryArcher Updated on: Feb 20, 2014 at 3:18 AM Updated by: Seawerst
The text was updated successfully, but these errors were encountered:
On 2013-07-26 06:50:19 UTC, eilonlipton commented:
Hi Gary, this is something we'd like to look into in a future version. In the meantime we recommend using the WCF Data Services client to talk to the Web API OData service. An alternative is to use ODataLib directly, which in the end is what Web API OData
uses to implement the OData functionality.
My company expects to implement IIS hosted Web APIs that run on app servers.
These will be called by IIS hosted web applications that run on web servers.
We can therefore use ApiControllers on the app servers and call them from
HttpClient from the web servers. I like this programming model, where we use
the same MediaTypeFormatter and extensibility points at both ends of the wire.
We expect to use EntitySetController endpoints wherever we can, for general
CRUD operations, using the JSON light format. Then fall back to ApiControllers
if we have to - for operations like IN queries that OData doesn't support.
Ideally I'd like to be able to the following. These may need to use different
wire formats (maybe JSON.Net and JSON light). However, I don't want to have to
use a DataServiceContext to call EntitySetController, since supporting two
entirely different client side programming models adds a lot of work.
I think I'm right in saying that the second case requires the client to use
the ODataMediaTypeFormatter, and the client needs to provide an IEdmModel via
the HttpRequestMessage.SetEdmModel method. However, I've been unable to get
this to work, with various formatter / serialization problems.
If this supported currently, and if so can anyone point me to some sample
code? Any help appreciated.
Work Item Details
Original CodePlex Issue: Issue 1140
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Jul 17, 2013 at 1:14 PM
Reported by: GaryArcher
Updated on: Feb 20, 2014 at 3:18 AM
Updated by: Seawerst
The text was updated successfully, but these errors were encountered: