Development With A Dot

Blog on development in general, and specifically on .NET

Sponsors

News

My Friends

My Links

Permanent Posts

Portuguese Communities

Using New ADO.NET Data Services Functionalities

In order to use the new functionalities (count, projections, server paging, for instance) supplied by version 1.5 of ADO.NET Data Services (see my previous post), you must explicitly enable them on the service side.

public static void InitializeService(DataServiceConfiguration config)
{
    config.EnableTypeConversion = true;
    config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
    config.UseVerboseErrors = true;
    config.SetEntitySetAccessRule("*", EntitySetRights.All);
    config.SetServiceOperationAccessRule("*", ServiceOperationRights.All);
}

Note that you need to use the DataServiceConfiguration instead of the IDataServiceConfiguration interface, which was the one that the wizard previously declared.

Bookmark and Share

Comments

Twitter Trackbacks for Using New ADO.NET Data Services Functionalities - Development With A Dot [asp.net] on Topsy.com said:

Pingback from  Twitter Trackbacks for                 Using New ADO.NET Data Services Functionalities - Development With A Dot         [asp.net]        on Topsy.com

# December 17, 2009 9:02 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)