コード例 #1
0
        public IActionResult DeletedTweets(string userId)
        {
            var deletedTweets = this.tweetsStatisticsService.GetDeletedTweetsByUserId(userId);

            var viewModel = new DeletedTweetsViewModel
            {
                DeletedTweetsModels = deletedTweets,
                UserId = userId
            };

            return(this.View(viewModel));
        }
コード例 #2
0
        public async Task <IActionResult> DeletedTweets(string userId)
        {
            var userExists = await this.adminUserSevice.UserExistsAsync(userId);

            if (!userExists)
            {
                return(this.View("NotFound"));
            }
            var deletedTweets = this.tweetStatisticsService.GetDeletedTweetsyUserId(userId);

            var vm = new DeletedTweetsViewModel
            {
                DeletedTweetModels = deletedTweets
            };

            return(this.View(vm));
        }