Example #1
0
        public JsonResult GetEntries()
        {
            var timeline = new Timeline { type = "default" };

            var dates = new List<Date>();
            _repository.GetEntries().ToList()
                                    .ForEach(entry => dates.Add(new Date(entry: entry)));
            timeline.date = dates;
            return Json(new { timeline }, JsonRequestBehavior.AllowGet);
        }
Example #2
0
        // GET api/photo
        public Timeline Get()
        {
            var timeline = new Timeline { Type = "default" };

            var dates = new List<Date>();
            _repository.GetEntries().ToList()
                                    .ForEach(entry => dates.Add(new Date(entry: entry)));
            timeline.Dates = dates;
            return timeline;
        }