public ApiResponse AddJournal(Guid ticketId, TicketJournal ticketJournal) { ticketJournal.Id = Guid.NewGuid(); ticketJournal.TicketId = ticketId; _faciTechDbContext.TicketJournal.Add(ticketJournal); _faciTechDbContext.SaveChanges(); return(new ApiResponse(new { Id = ticketJournal.Id })); }
public ActionResult Post(Guid ticketId, [FromBody] TicketJournalApiModel ticketJournalApiModel) { try { TicketJournal ticketJournal = _mapper.Map <TicketJournal>(ticketJournalApiModel); ApiResponse serviceResponse = this._ticketService.AddJournal(ticketId, ticketJournal); if (serviceResponse.IsSuccess()) { return(new ObjectCreatedResult("TicketJournals", serviceResponse.Id.Value)); } else { return(new ValidationErrorResult(serviceResponse)); } } catch (Exception ex) { return(new UnknownErrorResult(ex, base._errorEnabled)); } }
public ApiResponse DeleteJournal(Guid commentId, TicketJournal ticketJournal) { _faciTechDbContext.Remove(ticketJournal); _faciTechDbContext.SaveChanges(); return(new ApiResponse(new { Id = ticketJournal.Id })); }
public int CreateTicketJournal(TicketJournal ticketJournalDetails) { return(_ticketJournalRepository.Post(ticketJournalDetails)); }
public int Post(TicketJournal Ticket) { throw new NotImplementedException(); }
public int Post(TicketJournal ticketJournal) { return(_dbContext.Post <TicketJournal, int>(ticketJournal)); }