Exemple #1
0
        // GET: ShipAddresses/Details/5
        public async Task <IActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var shipAddress = await _addressRepository.GetAsync((int)id);

            if (shipAddress == null)
            {
                return(NotFound());
            }

            return(View(shipAddress));
        }
Exemple #2
0
        public async Task <IActionResult> Get(int id)
        {
            string      userID  = HttpContext.User.Identity.Name;
            ShipAddress address = await _shipAddressRepository.GetAsync(id);

            JsonResult result = new JsonResult(address);

            return(result);
        }