public ActionResult <AddressReadDto> CreateAddress(AddressCreateDto req) { var addressModel = _mapper.Map <Address>(req); _repository.CreateAddress(addressModel); _repository.SaveChanges(); var addressReadDto = _mapper.Map <AddressReadDto>(addressModel); return(CreatedAtRoute(nameof(GetAddressById), new { Id = addressReadDto.Id }, addressReadDto)); }