예제 #1
0
        public async Task <NoteListDTO> CreateNotListAsync(CreateNoteListDTO dto)
        {
            var item = _mapper.Map <NoteList>(dto);

            item.Status = NoteListStatus.Enabled;

            var createdItem = await _repository.CreateItemAsync(item);

            return(_mapper.Map <NoteListDTO>(createdItem));
        }
예제 #2
0
        public async Task <ActionResult <NoteListDTO> > PostAsync([FromBody] CreateNoteListDTO dto)
        {
            var note = await _noteService.CreateNotListAsync(dto);

            return(Ok(note));
        }