public override IController CreateController(RequestContext requestContext, string controllerName)
 {
     if (controllerName == "Customer")
     {
         var service = new CustomerService();
         var controller = new CustomerController(service);
         return controller;
     }
     else
     {
         return null;
     }
 }
        public object GetService(Type serviceType)
        {
            // 觀察 MVC 框架有哪些服務會透過 dependency resolver 來解析。
            System.Diagnostics.Debug.WriteLine(serviceType.FullName);

            // 解析特定 controller。
            if (serviceType == typeof(CustomerController))
            {
                var customerSvc = new CustomerService();
                var controller = new CustomerController(customerSvc);
                return controller;
            }

            // 不需要在此解析的型別,必須傳回 null。(不可拋異常!)
            return null;
        }