Esempio n. 1
0
 public IActionResult Article()
 {
     try
     {
         ViewBag.ArticleData = _repositry.getArticles();
     }
     catch (Exception ex)
     {
         Console.WriteLine("--" + ex);
         ViewBag.ArticleData = null;
     }
     return(View());
 }
Esempio n. 2
0
 public IActionResult Index()
 {
     try
     {
         ViewBag.Stories    = _repositry.getStories();
         ViewBag.Articles   = _articles.getArticles();
         ViewBag.Questions  = _questions.getQuestions();
         ViewBag.Users      = _users.GetUsers();
         ViewBag.Volunteers = _volunteer.getVolunteers();
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex);
     }
     return(View());
 }