public Ticket AddSupportTicket(Ticket supportTicket) { var obj = ticketRepository.Add(supportTicket); var noti = new Notification() { Id = Guid.NewGuid(), To = "admin", CreateBy = supportTicket.CreateBy, CreateAt = DateTime.Now, Read = false, Title = supportTicket.Title }; notificationRepository.Add(noti); return obj; }
public Ticket ReplySupportTicket(Ticket supportTicket) { foreach (var item in supportTicket.TicketItems) { if (item.Id == Guid.Empty) { item.Id = Guid.NewGuid(); ticketItemRepository.Add(item); } } //Notify to ticket owner var noti = new Notification() { Id = Guid.NewGuid(), To = supportTicket.CreateBy, CreateBy = supportTicket.CreateBy, CreateAt = DateTime.Now, Read = false, Title = supportTicket.Title }; notificationRepository.Add(noti); return supportTicket; }
public Notification Update(Notification notification) { throw new NotImplementedException(); }