コード例 #1
0
        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapHttpRoute(
                "Area51_DefaultApi",
                "Area51/api/{controller}/{id}",
                defaults: new { id = System.Web.Http.RouteParameter.Optional });

            context.MapRoute(
                "Area51_default",
                "Area51/{controller}/{action}/{id}",
                new { action = "Index", id = UrlParameter.Optional }
                );

            context.SetDependencyResolver(new UnityDependencyResolver(UnityConfig.GetConfiguredContainer()));
        }