Exemplo n.º 1
0
        public async Task <ActionResult> Index()
        {
            var messages = await _messagesService.GetAllAsync().ConfigureAwait(false);

            if (messages == null)
            {
                return(NotFound());
            }

            return(Ok(_mapper.Map <List <MessageResponse> >(messages.ToList())));
        }
Exemplo n.º 2
0
 public async Task <ActionResult> Index() => View(await _messagesService.GetAllAsync());
Exemplo n.º 3
0
        public async Task <IActionResult> GetAll(int take, int skip)
        {
            var result = await _messagesService.GetAllAsync(take, skip);

            return(Ok(result));
        }