async Task Refresh(bool sync = true) { if (!sync) { Tickets = await _ticketsService.GetTickets(sync); } else { IsRefreshing = true; Tickets = await _ticketsService.GetTickets(sync); IsRefreshing = false; } }
public ActionResult <IEnumerable <TicketModel> > GetTickets() { try { return(Ok(_Ticketservice.GetTickets())); } catch (BadRequestException ex) { return(BadRequest(ex)); } catch (Exception ex) { return(StatusCode(StatusCodes.Status500InternalServerError, $"Something happend: {ex.Message}")); } }
public async Task <IActionResult> Get() { return(Ok(await _ticketsService.GetTickets())); }