public TimetableModel Create(Timetable.Timetable t) { return new TimetableModel { name = "Timetable", url = GetRootUrl(), parent_url = GetRootUrl(), events = Timetable.Timetable.Instance.events.Select(e => this.CreateSummary(e)).ToList(), teachers = Timetable.Timetable.Instance.teachers.Select(tr => this.CreateSummary(tr)).ToList(), locations = Timetable.Timetable.Instance.locations.Select(l => this.CreateSummary(l)).ToList() }; }
public void Replace() { instance = this; }