public ActionResult GetAllNotes(int habitId) { DayManager dm = new DayManager(db); List <NoteView> notes = dm.GetAllNotes(habitId); string notesJSON = Newtonsoft.Json.JsonConvert.SerializeObject(notes); return(Json(notesJSON, JsonRequestBehavior.AllowGet)); }