Esempio n. 1
0
        public IViewComponentResult Invoke(int customerProfileId)
        {
            var customer = _customerService.GetCustomerById(customerProfileId);

            if (customer == null)
            {
                throw new ArgumentNullException(nameof(customer));
            }

            var model = _profileModelFactory.PrepareProfileInfoModel(customer);

            return(View(model));
        }
Esempio n. 2
0
        public virtual ActionResult Info(int customerProfileId)
        {
            var customer = _customerService.GetCustomerById(customerProfileId);

            if (customer == null)
            {
                return(RedirectToRoute("HomePage"));
            }

            var model = _profileModelFactory.PrepareProfileInfoModel(customer);

            return(PartialView(model));
        }