annotate Demo/WebServices/NorthwindDataService/DataService.svc.cs @ 4:f757da6161a1

!bug 100 + 2h fixed gregression
author cin
date Sun, 24 Aug 2014 17:57:42 +0400
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 }