public static SchoolDataStore Instance()
 {
     if (_instance == null)
     {
         _instance = new SchoolDataStore();
     }
     return(_instance);
 }
Beispiel #2
0
 public void Delete(int id)
 {
     SchoolDataStore.Instance().DeleteCourse(id);
 }
Beispiel #3
0
 public void Put(int id, [FromBody] CourseDTo newCourse)
 {
     SchoolDataStore.Instance().AddCourse(newCourse);
 }
Beispiel #4
0
 public void Post([FromBody] CourseDTo newCourse)
 {
     SchoolDataStore.Instance().UpdateCourse(newCourse);
 }
Beispiel #5
0
 public JsonResult Get(int id)
 {
     return(new JsonResult(SchoolDataStore.Instance().GetCourseById(id)));
 }
Beispiel #6
0
 public JsonResult Get()
 {
     return(new JsonResult(SchoolDataStore.Instance().GetAllCourses()));
 }
 public void Delete(int id)
 {
     SchoolDataStore.Instance().DeleteLecturer(id);
 }
 public void Put(int id, [FromBody] LecturerDTo value)
 {
     SchoolDataStore.Instance().AddLecturer(value);
 }
 public void Post([FromBody] LecturerDTo value)
 {
     SchoolDataStore.Instance().UpdateLecturer(value);
 }
 public LecturerDTo Get(int id)
 {
     return(SchoolDataStore.Instance().GetLecturerById(id));
 }