public int CreateProcess(int documentIdentifier, ProcessFormDto processDto) { processDto.DocumentId = documentIdentifier; var process = mapper.Map <Process>(processDto); return(processRepository.Create(process)); }
public IActionResult CreateProcess(int documentIdentifier, [FromBody] ProcessFormDto processDto) { if (!documentService.Exists(documentIdentifier)) { return(BadRequest()); } documentService.CreateProcess(documentIdentifier, processDto); return(Created($"documents/{documentIdentifier}/processes", processDto)); }