//Post public HttpResponseMessage Post(InstalledTicket ticket) { ticket.TicketId = Guid.NewGuid().ToString(); ticket.CreatedInstalledTicketDateTime = DateTime.Now; installedTticketManager.AddTicket(ticket); installedTticketManager.Save(); return(Request.CreateResponse(HttpStatusCode.Accepted)); }
//Delete public HttpResponseMessage Delete(InstalledTicket ticket) { installedTticketManager.DeleteTicket(ticket); installedTticketManager.Save(); return(Request.CreateResponse(HttpStatusCode.OK)); }
public void DeleteTicket(InstalledTicket ticket) { installedTicketManager.Delete(ticket); }
public void UpdateTicket(InstalledTicket ticket) { var originalTicket = installedTicketManager.GetQuery().Where <InstalledTicket>(t => t.TicketId == ticket.TicketId).FirstOrDefault() ?? null; installedTicketManager.Update(originalTicket, ticket); }
public void AddTicket(InstalledTicket ticket) { installedTicketManager.Add(ticket); }