Exemplo n.º 1
0
        // GET: Pictures/Details/5
        public async Task <ActionResult> Details(int id)
        {
            var response = await _clientWrapper.GetPicture("api/picturesapi", id);

            if (response.IsSuccessStatusCode)
            {
                var jsonModel = await response.Content.ReadAsStringAsync();

                var model = JsonConvert.DeserializeObject <Picture>(jsonModel);
                return(View(model));
            }
            return(View("Error"));
        }