예제 #1
0
        public async Task <ActionResult <Note> > Create([FromBody] CreateNote note)
        {
            logger.LogDebug($"Creating note");

            var createdNote = await notesService.CreateNoteAsync(note.Title, note.Content);

            logger.LogDebug($"Created note: {createdNote.Id}");

            return(Created($"api/notes/{createdNote.Id}", new Note(createdNote)));
        }