public string SetStudentToTeacher(int IdSchool, int IdTeacher, int IdStudent) { if (!_dal.IsExist(IdStudent)) { return("This Student Is Not Exist "); } if (!_dalschool.IsExist(IdSchool)) { return("This School Is Not Exist "); } if (!_dalteacher.IsExist(IdTeacher)) { return("This Teacher Is Not Exist "); } var Student = _dal.GetStudent(IdStudent); var Teacher = _dalteacher.GetTeaher(IdTeacher); ClassSchool Class = new ClassSchool() { Student = Student, Teacher = Teacher }; _dal.SetStudntToTeacher(Class, IdSchool); return("true"); }