public void AddPersonToReminderList(string reminderType, string reminderFrequency, int personId, int churchId)
        {
            var reminder = Context.Reminders.FirstOrDefault(r => r.ChurchId == churchId && r.ReminderType == reminderType);
            if (reminder == null)
            {
                reminder = new Reminder
                {
                    ChurchId = churchId,
                    ReminderType = reminderType,
                    ReminderFrequency = reminderFrequency
                };

                Context.Reminders.AddObject(reminder);
            }
            var personToBeAdded = Context.People.FirstOrDefault(p => p.PersonId == personId);
            if (personToBeAdded == null) return;
            if (personToBeAdded.PersonChurches.Any(pc => pc.ChurchId == churchId))
            {
                reminder.People.Add(personToBeAdded);
                Context.SaveChanges();
            }
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the Reminders EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToReminders(Reminder reminder)
 {
     base.AddObject("Reminders", reminder);
 }
 /// <summary>
 /// Create a new Reminder object.
 /// </summary>
 /// <param name="reminderId">Initial value of the ReminderId property.</param>
 /// <param name="churchId">Initial value of the ChurchId property.</param>
 /// <param name="reminderType">Initial value of the ReminderType property.</param>
 /// <param name="reminderFrequency">Initial value of the ReminderFrequency property.</param>
 public static Reminder CreateReminder(global::System.Int32 reminderId, global::System.Int32 churchId, global::System.String reminderType, global::System.String reminderFrequency)
 {
     Reminder reminder = new Reminder();
     reminder.ReminderId = reminderId;
     reminder.ChurchId = churchId;
     reminder.ReminderType = reminderType;
     reminder.ReminderFrequency = reminderFrequency;
     return reminder;
 }
        public void UpdateReminderList(string reminderType, string reminderFrequency, int churchId)
        {
            var reminder = Context.Reminders.FirstOrDefault(r => r.ChurchId == churchId && r.ReminderType == reminderType);
            if (reminder == null)
            {
                reminder = new Reminder
                {
                    ChurchId = churchId,
                    ReminderType = reminderType,
                    ReminderFrequency = reminderFrequency
                };

                Context.Reminders.AddObject(reminder);
            }
            reminder.ReminderFrequency = reminderFrequency;
            Context.SaveChanges();
        }