Ejemplo n.º 1
0
        public ActionResult <AddressReadDto> GetAddrById(int id)
        {
            var addr = _addrRepo.GetAddressById(id);

            if (addr != null)
            {
                return(Ok(_addrMapper.Map <AddressReadDto>(addr)));
            }
            return(NotFound());
        }
Ejemplo n.º 2
0
        public ActionResult <AddressReadDto> GetAddressById(int Id)
        {
            var addressItems = _repository.GetAddressById(Id);

            if (addressItems != null)
            {
                return(Ok(_mapper.Map <AddressReadDto>(addressItems)));
            }

            return(NotFound());
        }
Ejemplo n.º 3
0
        // GET: Address/Details/5
        public IActionResult GetById(int id)
        {
            var address = _repo.GetAddressById(id);

            return(View(address));
        }