コード例 #1
0
        public IActionResult Index()
        {
            var loguser = HttpContext.Session.GetObjectFromJson <Cammon.Dto.DtoUser>("loggerUser");
            var gelenıd = Convert.ToInt32(loguser.Id);
            //Takip ettiğim kişi listesi
            var fallow = conn.GetFallowing(gelenıd);
            //takip ettiğim kişiler
            var gelenuserlar = user.userListGetById(fallow);
            var TweetsAll    = tweet.GetListTweetbyUsersDetails(gelenuserlar, gelenıd);

            return(View(TweetsAll.OrderByDescending(x => x.Createddate).ToList()));
        }
コード例 #2
0
        public IActionResult GetbyFallowsTable(int id)
        {
            ConnectionMenager   conn = new ConnectionMenager();
            DtoUserProfileTweet UPT  = new DtoUserProfileTweet();

            UPT.takipedilen = conn.GetFallowing(id).ToList();
            UPT.takipci     = conn.GetFollowers(id).ToList();

            return(PartialView("_GetFallowsTable", UPT));
        }
コード例 #3
0
        public IActionResult Posttweet()
        {
            ConnectionMenager conn  = new ConnectionMenager();
            UserMenager       user  = new UserMenager();
            TweetMenager      tweet = new TweetMenager();
            var loguser             = HttpContext.Session.GetObjectFromJson <Cammon.Dto.DtoUser>("loggerUser");
            var gelenıd             = Convert.ToInt32(loguser.Id);
            //Takip ettiğim kişi listesi
            var fallow = conn.GetFallowing(gelenıd);
            //takip ettiğim kişiler
            var gelenuserlar = user.userListGetById(fallow);
            var TweetsAll    = tweet.GetListTweetbyUsersDetails(gelenuserlar, gelenıd);
            var sondurum     = TweetsAll.OrderByDescending(x => x.Createddate).ToList();

            return(PartialView("_Tweets", sondurum));
        }
コード例 #4
0
        public IActionResult Index(int id)
        {
            var sorguUser  = user.GetById(id);
            var sorguTweet = tweet.rtgetirici(id);
            var twcount    = sorguTweet.Count();
            var takip      = conn.GetFallowing(id);
            var takipci    = conn.GetFollowers(id);

            return(View(new DtoUserProfileTweet
            {
                TweetCount = twcount,
                User = sorguUser,
                dtoTweets = sorguTweet,
                takipci = takipci,
                takipedilen = takip
            }));
        }