public IEnumerable <ScheduledText> GetScheduledTexts()
 {
     using (var context = new MessageSchedulerContext(options))
     {
         return(context.ScheduledTexts.ToList());
     }
 }
 public ScheduledText GetScheduledTextById(int id)
 {
     using (var context = new MessageSchedulerContext(options))
     {
         return(context.ScheduledTexts.Find(id));
     }
 }
 public void UpdateScheduledText(ScheduledText scheduledText)
 {
     using (var context = new MessageSchedulerContext(options))
     {
         context.Entry(scheduledText).State = EntityState.Modified;
         context.SaveChanges();
     }
 }
 public void CreateScheduledText(ScheduledText scheduledText)
 {
     using (var context = new MessageSchedulerContext(options))
     {
         context.ScheduledTexts.Add(scheduledText);
         context.SaveChanges();
     }
 }
 public void DeleteScheduledText(int id)
 {
     using (var context = new MessageSchedulerContext(options))
     {
         ScheduledText text = context.ScheduledTexts.Find(id);
         context.ScheduledTexts.Remove(text);
         context.SaveChanges();
     }
 }