コード例 #1
0
        public async System.Threading.Tasks.Task <IActionResult> Me()
        {
            var       userId = GetCurrentUserId();
            UserModel user   = await usersService.GetUserById(userId);

            IEnumerable <PhotoModel> photos = await photosService.GetPhotosByUser(userId, userId);

            return(View(new PublicUserWithPhotos
            {
                User = user.ToPublic(),
                Photos = photos.Select(photoModelConverter.ToPublic)
            }));
        }