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)); }
public async Task <ActionResult <NoteListDTO> > PostAsync([FromBody] CreateNoteListDTO dto) { var note = await _noteService.CreateNotListAsync(dto); return(Ok(note)); }