public Reminder Parse(ReminderModel model)
        {
            Reminder reminder = new Reminder()
            {
                Id           = model.Id,
                Date         = model.Date,
                ReminderInfo = model.ReminderInfo
            };

            switch (model.Type)
            {
            case ActivityType.Course:
            {
                reminder.ReminderActivity = _repository.GetCourse(model.ActivityId);
                break;
            }

            case ActivityType.Exam:
            {
                reminder.ReminderActivity = _repository.GetExam(model.ActivityId);
                break;
            }
            }
            return(reminder);
        }
        public ReminderModel Create(Reminder reminder)
        {
            ReminderModel reminderModel = new ReminderModel()
            {
                Id           = reminder.Id,
                Date         = reminder.Date,
                ReminderInfo = reminder.ReminderInfo
            };

            if (reminder.ReminderActivity is Course)
            {
                Course course = reminder.ReminderActivity as Course;
                reminderModel.ActivityId = course.Id;
                reminderModel.Type       = ActivityType.Course;
            }
            else
            {
                Exam exam = reminder.ReminderActivity as Exam;
                reminderModel.ActivityId = exam.Id;
                reminderModel.Type       = ActivityType.Exam;
            }
            return(reminderModel);
        }