Beispiel #1
0
 public IActionResult Index()
 {
     ViewModels.PostUser redditList = new ViewModels.PostUser()
     {
         ListOfPosts = redditService.GetAllElements(),
         User        = redditService.GetLoginUser(),
         ListOfUsers = redditService.GetAllUsers()
     };
     return(View(redditList));
 }
Beispiel #2
0
 public IActionResult ShowAllOfMyPosts()
 {
     ViewModels.PostUser redditList = new ViewModels.PostUser()
     {
         ListOfPosts = redditService.RedditAllPostsOfUser(),
         User        = redditService.GetLoginUser(),
         ListOfUsers = redditService.GetAllUsers()
     };
     return(View("../Reddit/index", redditList));
 }
Beispiel #3
0
        public IActionResult SearchPost(Post post)
        {
            List <Post> tempList = new List <Post>();

            tempList.Add(redditService.SearchPost(post));
            ViewModels.PostUser redditList = new ViewModels.PostUser()
            {
                ListOfPosts = tempList,
                User        = redditService.GetLoginUser(),
                ListOfUsers = redditService.GetAllUsers()
            };
            return(View("../Reddit/index", redditList));
        }