Пример #1
0
        public async Task <IActionResult> Index()
        {
            var messages = await _service.GetAllMessagesAsync();

            ViewBag.Heading = "All Messages";

            return(View("DisplayList", messages));
        }
Пример #2
0
        public async Task <IActionResult> Index()
        {
            var messages = await _service.GetAllMessagesAsync();

            return(View(messages));
        }