Beispiel #1
0
 public static void SeedSupportTicketTopics(ApplicationDbContext context)
 {
     foreach (var topic in Enum.GetValues(typeof(SupportTicketTopicsEnum)))
     {
         if (context.SupportTicketTopics.Where(stt => stt.Name == topic.ToString()).FirstOrDefault() == null)
         {
             var ticketTopic = new SupportTicketTopic()
             {
                 Name = topic.ToString()
             };
             context.Add(ticketTopic);
         }
     }
 }
 public void DeleteTicketTopic(SupportTicketTopic supportTicketTopic)
 {
     this.context.Remove(supportTicketTopic);
 }
 public void UpdateTicketTopic(SupportTicketTopic supportTicketTopic)
 {
     this.context.Update(supportTicketTopic);
 }
 public void CreateTicketTopic(SupportTicketTopic supportTicketTopic)
 {
     this.context.Add(supportTicketTopic);
 }