コード例 #1
0
 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());
     }
 }
コード例 #2
0
 public NotesDTO GetNote(int id)
 {
     return(_notesContext.GetNote(id));
 }