locked
Atom DeSerializer RRS feed

  • Question

  • Is there any straightforward way to deserizlize the Atom response from and ADO.Net DataService (using entity framework).  Basically it is easier to build a flexible http uri request from code send a WebRequest than to build a linq query (in the cases we are trying to support) so the idea was to send a WebRequest then call the same serializer that would be called if one were using a DataServiceRequest.   So the question is can we access the atom serializer/deserializer used by the DataService Request/Response ?

     

    Farsider.

    Monday, November 10, 2008 7:59 PM

Answers

  • If what you're trying to achieve is to use URLs instead of LINQ for formulating queries, you can do that with the Data Services client. There is a method in DataServiceContext called Execute that takes a URL. The result is a sequence of objects materialized with the same materializer that is used for LINQ queries.

     

    You would still get identity resolution and object tracking. If you don't want those either (only want materialization), then you can set the DataServiceContext.MergeOption property to NoTracking and you should be all set.

     

    Pablo Castro
    Software Architect
    Microsoft Corporation
    http://blogs.msdn.com/pablo

     

     

    Thursday, November 13, 2008 6:29 AM
    Moderator