public static SchoolDataStore Instance() { if (_instance == null) { _instance = new SchoolDataStore(); } return(_instance); }
public void Delete(int id) { SchoolDataStore.Instance().DeleteCourse(id); }
public void Put(int id, [FromBody] CourseDTo newCourse) { SchoolDataStore.Instance().AddCourse(newCourse); }
public void Post([FromBody] CourseDTo newCourse) { SchoolDataStore.Instance().UpdateCourse(newCourse); }
public JsonResult Get(int id) { return(new JsonResult(SchoolDataStore.Instance().GetCourseById(id))); }
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)); }