public ActionResult Create(SalesOrderHeaderCreateDto salesOrderHeaderCreateDto) { var salesOrderHeaderModel = _mapper.Map <SalesOrderHeader>(salesOrderHeaderCreateDto); _salesOrderHeaderService.Create(salesOrderHeaderModel); _salesOrderHeaderService.SaveChanges(); var salesOrderHeaderReadFullDto = _mapper.Map <SalesOrderHeaderReadFullDto>(salesOrderHeaderModel); return(CreatedAtRoute(nameof(GetSalesOrderHeader), new { id = salesOrderHeaderReadFullDto.Id }, salesOrderHeaderReadFullDto)); }