public List<Person> SelectStudentsOfCourse(Course course)
 {
     using (var db = new EducationCourses())
     {
         return new List<Person>(db.SelectStudentsByCourseNo(course.ID));
     }
 }
 private void Delete(Course param)
 {
     try
     {
         _repository.Delete(param);
     }
     catch { }
 } 
 public void Insert(Course course,Person student)
 {
     using (var db=new EducationCourses())
     {
         db.MemberShips.Add(new MemberShip {ID=Guid.NewGuid(), Courses_ID = course.ID, Persons_ID = student.ID, 
             MemberShipDate = PersianDateTime.Now.Date.ToString().Substring(0,10)});
         db.SaveChanges();
     }
 }
 private   void Send()
 {
     try
     {
         List<string> mobileNumbers = this._repository.SelectStudentsOfCourse
             (this._selectedCourse).Select(st => st.Phone).ToList();
        // var a = await System.Math.Round(2.22);
         // method of web service K Faal nashoooooooooood
         this._selectedCourse = null;
         base.OnPropertyChanged("SelectedCourse");
     }
     catch
     {
     }
 }
        private void Add()
        {
            try
            {
                this._repository.Insert(this.SelectedCourse, this.SelectedStudent);
                this._selectedStudent = null;
                this._selectedCourse = null;
                base.OnPropertyChanged("SelectedCourse");
                base.OnPropertyChanged("SelectedStudent");
                this._courses.Clear();
                this._courses = new ObservableCollection<Course>(this._repository.SelectAllCourses());
                base.OnPropertyChanged("Courses");

            }
            catch
            {
            }
        }