コード例 #1
0
 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 }));
 }
コード例 #2
0
 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));
     }
 }
コード例 #3
0
 public ApiResponse DeleteJournal(Guid commentId, TicketJournal ticketJournal)
 {
     _faciTechDbContext.Remove(ticketJournal);
     _faciTechDbContext.SaveChanges();
     return(new ApiResponse(new { Id = ticketJournal.Id }));
 }
コード例 #4
0
 public int CreateTicketJournal(TicketJournal ticketJournalDetails)
 {
     return(_ticketJournalRepository.Post(ticketJournalDetails));
 }
コード例 #5
0
 public int Post(TicketJournal Ticket)
 {
     throw new NotImplementedException();
 }
コード例 #6
0
 public int Post(TicketJournal ticketJournal)
 {
     return(_dbContext.Post <TicketJournal, int>(ticketJournal));
 }