ADO.NET Data Services Content Types

An ADO.NET Data Service allows a client of the service to code to the data being transmitted rather than to a particular data format. The ADO.NET Data Service protocol is designed to exchange resources in multiple serialization formats such as Atom and JSON.

The best format for you depends on the application using the data service and its runtime environment. For example, AJAX-based applications that run inside Web browsers may find the JSON format easiest to use because JSON can be consumed as JavaScript objects.

Converting EDM Primitive Types from and to CLR Primitives

Because ADO.NET Data Services are defined in terms of the Entity Data Model (EDM), mapping allows clients not using the ADO.NET Data Service client library to interoperate with an ADO.NET Data Service. The following table defines the mapping between CLR and EDM types.

EDM Type CLR Type

Edm.Binary

byte[]

Edm.Boolean

Bool

Edm.Byte

Byte

Edm.DateTime

DateTime

Edm.Decimal

Decimal

Edm.Double

Double

Edm.Guid

Guid

Edm.Int16

Int16

Edm.Int32

Int32

Edm.Int64

Int64

Edm.String

String

See Also

Tags :


Page view tracker