Exemplo n.º 1
0
        public IActionResult Profile()
        {
            var     userId         = userManager.GetUserId(HttpContext.User);
            Profile profilSelectat = profileService.GetDetailsById(userId);

            //string username = txtusername.Text;


            var profileVM = new ProfileVM {
                UserId        = userId,
                Nume          = profilSelectat.Nume,
                Description   = profilSelectat.Description,
                NrDislikes    = profilSelectat.NrDislikesT,
                NrLikes       = profilSelectat.NrLikesT,
                NrSubscribers = profilSelectat.NrSubscribers,
                Videos        = videosService.GetVideosByUserId(userId)
            };

            return(View(profileVM));
        }