private HomeDetailsViewModel GetDetailsViewModel(Guid objectId)
        {
            // todo: uncomment to simulate unhandled-exception handling
            // throw new Exception();

            return(new HomeDetailsViewModel
            {
                Customer = DataViewModelMapper.Map(_customerApplicationService.GetCustomer(objectId))
            });
        }
        public IActionResult Details(Guid id)
        {
            var viewModel = new HomeDetailsViewModel();

            try
            {
                var customer = _customerApplicationService.GetCustomer(id);
                viewModel.Customer = DataViewModelMapper.Map(customer);
            }
            catch (BusinessException bex)
            {
                TreatHandledException(bex, viewModel);
            }
            catch (Exception ex)
            {
                TreatUnhandledException(ex, viewModel);
            }

            return(View(viewModel));
        }