public ActionResult <Note> GetNote(int id) { try { return(notesContext.GetNote(id)); } catch // if the context throws any exception, the note can't be found anyways { return(NotFound()); } }
public NotesDTO GetNote(int id) { return(_notesContext.GetNote(id)); }