Esempio n. 1
0
        public ActionResult Details(int id = 0)
        {
            var user = userService.GetUser(id);

            if (user == null)
            {
                user = userService.GetUserByEmail(User.Identity.Name);
            }
            var viewModel = Mapper.Map <UserDetailsViewModel>(user);

            viewModel.InterstingLots = Mapper.Map <IEnumerable <LotViewModel> >(lotService.GetInterstingLots(user.UserId));
            viewModel.AvatarPath     = imageService.GetResizedUrl(viewModel.AvatarPath, 250, 250);
            return(View(viewModel));
        }