0
|
1 using System;
|
|
2 using System.Data.Services;
|
|
3 using System.Data.Services.Common;
|
|
4
|
|
5 namespace NorthwindDataService
|
|
6 {
|
|
7 public class DataService : BLToolkit.ServiceModel.DataService<NorthwindDS.DataContext>
|
|
8 {
|
|
9 // This method is called only once to initialize service-wide policies.
|
|
10 public static void InitializeService(DataServiceConfiguration config)
|
|
11 {
|
|
12 // TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
|
|
13 // Examples:
|
|
14 config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);
|
|
15 // config.SetServiceOperationAccessRule("MyServiceOperation", ServiceOperationRights.All);
|
|
16 config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
|
|
17 }
|
|
18 }
|
|
19 }
|