예제 #1
0
        public int Create(DocumentFormDto document)
        {
            Document entity = mapper.Map <Document>(document);

            return(documentRepository.Create(entity));
        }
예제 #2
0
        public IActionResult CreateDocument([FromBody] DocumentFormDto documentDto)
        {
            int id = documentService.Create(documentDto);

            return(Created($"/documents/{id}", documentDto));
        }