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; } }
public IHttpActionResult Post(NoteDO body) { try { NotesBS BS = new NotesBS(); NoteDO noteDO = BS.Save(body.body); return(Ok(noteDO)); } catch (Exception) { Console.WriteLine("Something went wrong. Try again!"); throw; } }
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; } }
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; } }