Introduced
New features of Ado.net Data Services 1.5
* Support Service-side rowcount-gets the number of members of the specified entity collection (returns only an integer value and does not return an entity collection)
* Support Service-side paging-server side can return paginated data, and it can contain total data totals
* Support for Server Select-returned results only include fields for select
* Support Large data transfer BLOB (binary large object)
* Support Custom Data Services
Example
1, service-side rowcount Demo
MyDataService.svc.cs
Code
using System;
using System.Collections.Generic;
using System.Data.Services;
using System.Data.Services.Common;
using System.Linq;
using System.ServiceModel.Web;
using System.Web;
Namespace DataAccess.DataServices.Service
{
[System.ServiceModel.ServiceBehavior ( Includeexceptiondetailinfaults = True)]
public class Mydataservice:dataservice<myentity.adventureworksentiti Es>
{
public static void InitializeService (dataserviceconfiguration config)
{
Config. Dataservicebehavior.maxprotocolversion = Dataserviceprotocolversion.v2;
Config. Setentitysetaccessrule ("Products", entitysetrights.all);
//Setentitysetpagesize (string name, int size)-new method. Used to provide the paging data
//String name-Specify the entity collection to be used for paging
//int Size-page size for pagination
Config. Setentitysetpagesize ("Products", 5);
}
}
}