public bool PostNote([FromBody] Note note)
        {
            NoteDataAccess data = new NoteDataAccess();

            if (data.PostNote(note.Content))
            {
                return(true);
            }
            return(false);
        }
Beispiel #2
0
        public ActionResult <Note> InsertNote([FromBody] Note note)
        {
            NoteDataAccess data = new NoteDataAccess();

            if (data.InsertNote(note.Content))
            {
                return(note);
            }
            return(BadRequest("Invalid data."));
        }
        public IEnumerable <Note> GetAllNotes(string content)
        {
            NoteDataAccess data = new NoteDataAccess();

            return(data.GetNotes(content));
        }
        public IEnumerable <string> GetAllNotes()
        {
            NoteDataAccess data = new NoteDataAccess();

            return(data.GetAllNotes());
        }
Beispiel #5
0
        public IEnumerable <string> SearchAsYouType(string content)
        {
            NoteDataAccess data = new NoteDataAccess();

            return(data.SearchAsYouType(content));
        }