public async Task <ActionResult <ProducentDto> > CreateProducent(ProducentForCreateDto producent) { _orm.OpenConn(); var producentEntity = _mapper.Map <Producent>(producent); var returnedProducent = await _orm.CreateProducent(producentEntity); var producentDto = _mapper.Map <ProducentDto>(returnedProducent); await _orm.CloseConn(); return(CreatedAtRoute("GetProducent", new { producentID = producentDto.Id }, producentDto)); }