示例#1
0
        public IActionResult ViewAllQuests()
        {
            var model = _questDAO.FetchAllRecords();

            if (model == null)
            {
                ViewBag.ErrorMessage = "Sorry, we could not retrieve the list of all Quests.";
                _logger.LogError($"Could not retrieve the Quests from Db.");
                return(View($"Error"));
            }
            return(View($"ViewAllQuests", model));
        }
示例#2
0
 public IActionResult Index()
 {
     return(View(_groupDAO.FetchAllRecords().OrderBy(g => g.Name)));
 }