Exemple #1
0
 public IHttpActionResult GetAllNotes()
 {
     try
     {
         NotesBS       BS         = new NotesBS();
         List <NoteDO> listNoteDO = BS.Fetch();
         return(Ok(listNoteDO));
     }
     catch (Exception)
     {
         Console.WriteLine("Something went wrong. Try again!");
         throw;
     }
 }
Exemple #2
0
        public IHttpActionResult GetQueriedNote([FromUri] string query)
        {
            try
            {
                NotesBS       BS     = new NotesBS();
                List <NoteDO> noteDO = BS.Fetch(query);

                return(Ok(noteDO));
            }
            catch (Exception)
            {
                Console.WriteLine("Something went wrong. Try again!");
                throw;
            }
        }
Exemple #3
0
        public IHttpActionResult GetOneNote(int id)
        {
            try
            {
                NotesBS BS     = new NotesBS();
                NoteDO  noteDO = BS.Fetch(id);

                return(Ok(noteDO));
            }
            catch (Exception)
            {
                Console.WriteLine("Something went wrong. Try again!");
                throw;
            }
        }