diff --git a/LangLang/Core/Controller/TutorController.cs b/LangLang/Core/Controller/TutorController.cs new file mode 100644 index 00000000..04c0cfe0 --- /dev/null +++ b/LangLang/Core/Controller/TutorController.cs @@ -0,0 +1,37 @@ +using LangLang.Core.DAO; +using LangLang.Core.Model; +using LangLang.Core.Observer; +using System.Collections.Generic; + +namespace LangLang.Core.Controller +{ + public class TutorController + { + private readonly TutorDAO _tutors; + + public TutorController() + { + _tutors = new TutorDAO(); + } + + public Dictionary GetAllTutors() + { + return _tutors.GetAllTutors(); + } + + public void Add(Tutor tutor) + { + _tutors.Add(tutor); + } + + public void Delete(int tutorId) + { + _tutors.Remove(tutorId); + } + + public void Subscribe(IObserver observer) + { + _tutors.Subscribe(observer); + } + } +}