private Response GetTimeTables() { if (mIsDebug) { Console.WriteLine("GET: /rest/v1/timetables"); } return(Response.AsJson(TimeTableDTOConverter.ToDTO(_timeTableRepository.GetList(), FindCurrentSunSchedule()))); }
private Response GetTimeTable(int id) { if (mIsDebug) { Console.WriteLine("GET: /rest/v1/timetables/{id}"); Console.WriteLine("Id={0}", id); } var timeTable = _timeTableRepository.GetById(id); if (timeTable != null) { return(Response.AsJson(TimeTableDTOConverter.ToDTO(timeTable, FindCurrentSunSchedule()))); } return(HttpStatusCode.NotFound); }