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()))); }
public async Task <ActionResult> Index() => View(await _messagesService.GetAllAsync());
public async Task <IActionResult> GetAll(int take, int skip) { var result = await _messagesService.GetAllAsync(take, skip); return(Ok(result)); }