public PersonalNotes Put(String new_note, DateTime note_date) { PersonalNotes createNote = new PersonalNotes { NoteString = new_note, NoteCreationDate = note_date }; return(createNote); }
public bool Delete(int id) { PersonalNotes noteId = db.personalnotes.Find(id); if (noteId == null) { return(false); } else { db.personalnotes.Remove(noteId); db.SaveChanges(); } return(true); }
public bool UpdateNote(int id, string new_notestring) { PersonalNotes personalID = db.personalnotes.Find(id); if (personalID == null) { return(false); } else { personalID.NoteString = new_notestring; db.SaveChanges(); } return(true); }