Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LINQ serialization

Somewhere (I wish I knew where), Jon Skeet and Marc Gravel were thinking about working on a tool that translated a LINQ query to XML for transfer over the wire? Does anyone know if they, or someone else has done this and made it public?

Scenario: distributed & cross assembly. This is a nice to have feature for me at this stage.

Maybe this isn't possible yet.

like image 501
sgtz Avatar asked Jul 17 '11 15:07

sgtz


People also ask

What is the serialization in C#?

Serialization is the process of converting an object into a stream of bytes to store the object or transmit it to memory, a database, or a file. Its main purpose is to save the state of an object in order to be able to recreate it when needed. The reverse process is called deserialization.

What is the use of serialize ()?

The serialize() function converts a storable representation of a value. To serialize data means to convert a value to a sequence of bits, so that it can be stored in a file, a memory buffer, or transmitted across a network.

What does serialization mean?

Serialization is the process of converting a data object—a combination of code and data represented within a region of data storage—into a series of bytes that saves the state of the object in an easily transmittable form.

What is serialization in .NET with example?

Serialization is the process of converting the state of an object into a form that can be persisted or transported. The complement of serialization is deserialization, which converts a stream into an object. Together, these processes allow data to be stored and transferred. .


1 Answers

You can take a look to WCF Data Services.

The WCF Data Services client library enables you to execute queries against a data service by using familiar .NET Framework programming patterns, including using language integrated query (LINQ).

It can translate LINQ queries, e.g.:

var selectedOrders = from o in context.Orders
    where o.Freight > 30
    orderby o.ShippedDate descending 
    select o;

will translated into following URI: http://localhost:12345/Northwind.svc/Orders?Orderby=ShippedDate&?filter=Freight gt 30

like image 109
Kirill Polishchuk Avatar answered Oct 02 '22 00:10

Kirill Polishchuk