Пример #1
0
 void EventsManager_OnApplication_InitializeComplete(object sender, ApplicationArgs e)
 {
     ODataConventionModelBuilder builder = new ODataConventionModelBuilder();
     builder.EntitySet<Member>("Members");
     builder.EntitySet<MemberExtend>("MemberExtends");
     System.Web.Http.GlobalConfiguration.Configure(config =>
     {
         //config.EnableQuerySupport();
         config.MapODataServiceRoute(routeName: "OData", routePrefix: "odata", model: builder.GetEdmModel());
     });
 }
Пример #2
0
 public void InitApplicationEvents(object sender, ApplicationEvents events)
 {
     var applicationArgs = new ApplicationArgs()
     {
         ApplicationContext = GlobalApplicationObject.Current.ApplicationContext
     };
     switch (events)
     {
         case ApplicationEvents.OnApplication_PreInitialize:
             OnApplication_PreInitialize(sender, applicationArgs);
             break;
         case ApplicationEvents.OnApplication_InitializeComplete:
             OnApplication_InitializeComplete(sender, applicationArgs);
             break;
         default:
             break;
     }
 }
Пример #3
0
        public void InitApplicationEvents(object sender, ApplicationEvents events)
        {
            var applicationArgs = new ApplicationArgs()
            {
                ApplicationContext = GlobalApplicationObject.Current.ApplicationContext
            };

            switch (events)
            {
            case ApplicationEvents.OnApplication_PreInitialize:
                OnApplication_PreInitialize(sender, applicationArgs);
                break;

            case ApplicationEvents.OnApplication_InitializeComplete:
                OnApplication_InitializeComplete(sender, applicationArgs);
                break;

            default:
                break;
            }
        }
Пример #4
0
 void EventsManager_OnApplication_InitializeComplete(object sender, ApplicationArgs e)
 {
     BundleConfig.RegisterBundles(BundleTable.Bundles);
 }