Does the read datasource not work if a list of a model is returned?
This is the code im using to try and populate the scheduler but everything ive tried makes it return blank. Could it be because im trying to return a list of models?
This is the code im using to try and populate the scheduler but everything ive tried makes it return blank. Could it be because im trying to return a list of models?
public ActionResult PopulateCalendar() { using (var entities = new OpenRoad.Data.Repository.OpenRoadEntities()) { var appointments = (from e in entities.Appointments where e.UserId == OpenRoad.Web.Session.UserId select new Models.Calendar { TaskID = e.AppointmentId, UserId = e.UserId ?? '1', Title = e.Subject, Description=e.Description, Start = e.StartTimeUtc ?? DateTime.Now, End = e.EndTimeUtc ?? DateTime.Now, IsAllDay = false, }).OrderBy(o => o.Start).ToList(); return Json(appointments, JsonRequestBehavior.AllowGet); } }