﻿using System.Web.Mvc;

namespace PremierLeagueApp.Areas.Public
{
    public class PublicAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "Public";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
                name: "default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                constraints: new { controller = "(?!Administration).*" },
                namespaces: new string[] { "PremierLeagueApp.Areas.Public.Controllers" } 
            );
        }
    }
}