topical media & game development

talk show tell print

#mobile-application-03-OData-ODataDerbyService-DerbyService.svc.cs / cs



  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 ODataDerbyService
  {
      public class DerbyService : DataService<DerbyNamesEntities>
      {
          // This method is called only once to initialize service-wide policies.
          public static void InitializeService(DataServiceConfiguration config)
          {
              // TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
              // Examples:
              config.SetEntitySetAccessRule("*", EntitySetRights.All);
              config.UseVerboseErrors = true;
              // config.SetServiceOperationAccessRule("MyServiceOperation", ServiceOperationRights.All);
              config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
          }
      }
  }
  


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.