public List <NoteDO> Fetch() { NotesDAL dal = new NotesDAL(); List <NoteDO> listNoteDOs = dal.Fetch(); return(listNoteDOs); }
public List <NoteDO> Fetch(string query) { NotesDAL dal = new NotesDAL(); List <NoteDO> listNoteDOs = dal.Fetch(query); return(listNoteDOs); }
public NoteDO Save(string note) { NotesDAL dal = new NotesDAL(); NoteDO savedNote = dal.Save(note); return(savedNote); }
public NoteDO Fetch(int id) { NotesDAL dal = new NotesDAL(); NoteDO result = dal.Fetch(id); return(result); }
public ActionResult Pin(Note note) { note.IsMarked = !note.IsMarked; NotesDAL.Update(note); return(RedirectToAction("Index")); }
public ActionResult Index(NoteRequest request) { var notes = NotesDAL.Retrieve(request); ViewBag.Title = "Notes"; return(View(notes)); }
public ActionResult Save(Note note) { if (note.Id == 0) { NotesDAL.Create(note); } else { NotesDAL.Update(note); } return(RedirectToAction("Index")); }
public ActionResult Delete(int id) { NotesDAL.Delete(id); return(RedirectToAction("Index")); }