annotate Demo/WebServices/NorthwindDataService/DataService.svc.cs @ 9:1e85f66cf767 default tip

update bltoolkit
author nickolay
date Thu, 05 Apr 2018 20:53:26 +0300
parents f990fcb411a9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
1 using System;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
2 using System.Data.Services;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
3 using System.Data.Services.Common;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
4
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
5 namespace NorthwindDataService
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
6 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
7 public class DataService : BLToolkit.ServiceModel.DataService<NorthwindDS.DataContext>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
8 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
9 // This method is called only once to initialize service-wide policies.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
10 public static void InitializeService(DataServiceConfiguration config)
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
11 {
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
12 // TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
13 // Examples:
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
14 config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
15 // config.SetServiceOperationAccessRule("MyServiceOperation", ServiceOperationRights.All);
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
16 config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
17 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
18 }
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
19 }