Пример #1
0
        public PersonalNotes Put(String new_note, DateTime note_date)
        {
            PersonalNotes createNote = new PersonalNotes {
                NoteString = new_note, NoteCreationDate = note_date
            };

            return(createNote);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }