public ActionResult GetEvents() { //var events = uow.Events.GetEventsDto().ToList(); var events = CalendarGoogleService.GetCalendarEvents(); return(Json(events, JsonRequestBehavior.AllowGet)); }
public ActionResult GetPodcasts() { try { //var podcasts = uow.Podcasts.GetLast10(); var podcasts = CalendarGoogleService.GetCalendarEventsWithPodcasts(); return(Json(podcasts, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { // Append line to the file. using (StreamWriter writer = new StreamWriter(System.Web.HttpContext.Current.Server.MapPath("~/App_Data/Error/log.text"), true)) { writer.WriteLine(ex); } return(Json(null, JsonRequestBehavior.AllowGet)); } }