Пример #1
0
        public ActionResult GetAll()
        {
            try
            {
                IEnumerable <User>        users     = UserRepository.GetAll();
                IEnumerable <UserAddress> addresses = UserAddressRepository.GetAll();

                return(View(Models.UserFacade.Build(users, addresses)));
            }
            // catch(BusinessLayer.AuthorizationException) // display authorization response
            catch (Exception e)
            {
                // Should return an exception relative result if the user needs to know about it.
                // Otherwise, just log the exception.
                return(View());
            }
        }