public async Task <TicketModel> AddTicketAsync(TicketCreateUpdateModel updateModel) { var ticket = Ticket.From(updateModel); var id = await _mongoRepository.InsertOneAsync(ticket); var model = TicketModel.From(ticket); return(model); }
public async Task <TicketModel> GetTicketById(Guid id) { var ticket = await _mongoRepository.FindByIdAsync(id); return(TicketModel.From(ticket)); }