コード例 #1
0
 public async Task <IActionResult> CreateNote(NoteDAL newNote)
 {
     try
     {
         return(Ok(NotesService.CreateNote(newNote)));
     }
     catch (NoteAlreadyExistsException)
     {
         return(BadRequest("A Note with that name already exists."));
     }
 }