예제 #1
0
        public IActionResult Index()
        {
            string CurrentUserID = user.GetUserAsync(HttpContext.User).Result.Id;

            var res = service.GetAllUserPosts(user.GetUserAsync(HttpContext.User).Result.Id);

            ViewBag.posts               = res;
            ViewBag.CurrentUserID       = user.GetUserAsync(HttpContext.User).Result.Id;
            ViewBag.CurrentUserUserName = userHomeService.GetUserName(CurrentUserID);

            ViewBag.user = user.GetUserAsync(HttpContext.User).Result;
            ViewBag.img  = user.GetUserAsync(HttpContext.User).Result;

            ViewBag.friendes = friendsServiece.GetAllFrinds();
            ViewBag.user     = user.GetUserAsync(HttpContext.User).Result;
            ViewBag.CurrUser = CurrUser;

            return(View());
        }
 public IActionResult GetOnlyUserPosts(string userId)
 {
     ViewBag.CurrentUserID       = UserManager.GetUserAsync(HttpContext.User).Result.Id;
     ViewBag.CurrentUserUserName = userHomeService.GetUserName(userId);
     return(PartialView("GetAll", userHomeService.GetOnlyUserPosts(userId)));
 }