public int Create(DocumentFormDto document) { Document entity = mapper.Map <Document>(document); return(documentRepository.Create(entity)); }
public IActionResult CreateDocument([FromBody] DocumentFormDto documentDto) { int id = documentService.Create(documentDto); return(Created($"/documents/{id}", documentDto)); }