PageRenderTime 22ms CodeModel.GetById 15ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

/WCFWebApi/samples/scenario/ContactManager_Simple/Global.asax.cs

#
C# | 21 lines | 15 code | 3 blank | 3 comment | 0 complexity | 442f9933f8fdef190bcaae05d176f38d MD5 | raw file
 1// <copyright>
 2//   Copyright (c) Microsoft Corporation.  All rights reserved.
 3// </copyright>
 4
 5namespace ContactManager_Simple
 6{
 7    using System;
 8    using System.Web.Routing;
 9    using Microsoft.ApplicationServer.Http;
10
11    public class Global : System.Web.HttpApplication
12    {
13        protected void Application_Start(object sender, EventArgs e)
14        {
15            RouteTable.Routes.SetDefaultHttpConfiguration(new WebApiConfiguration() { EnableTestClient = true });
16            
17            RouteTable.Routes.MapServiceRoute<ContactApi>("Contact");
18            RouteTable.Routes.MapServiceRoute<ContactsApi>("Contacts");
19        }
20    }
21}