public IActionResult Article() { try { ViewBag.ArticleData = _repositry.getArticles(); } catch (Exception ex) { Console.WriteLine("--" + ex); ViewBag.ArticleData = null; } return(View()); }
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()); }