예제 #1
0
        public ActionResult Calendar()
        {
            IEnumerable <Appointment> appointments = appointmentBusiness.List();

            List <CalendarModel> calendarItems = new List <CalendarModel>();

            appointments.ToList().ForEach(item =>
            {
                calendarItems.Add(AppointmentModel.ToCalendarModel(item));
            });

            ViewBag.Appointments = ToJSON(calendarItems);
            return(View());
        }