Пример #1
0
        // GET: People
        public ActionResult Index()
        {
            var url = "https://torre.bio/api/bios/giganteg";

            Genoma.Models.Root Persona = _download_serialized_json_data <Genoma.Models.Root>(url);
            return(View(Persona));
//            return View(db.People.ToList());
        }
Пример #2
0
        // GET: People/Details/5
        public ActionResult Details(string id)
        {
            if (id == null)
            {
                id = "giganteg";
                //return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
            }
            var url = "https://torre.bio/api/bios/" + id;

            Genoma.Models.Root Persona = _download_serialized_json_data <Genoma.Models.Root>(url);

            //            Person person = db.People.Find(id);
            //Genoma.Models.Root Persona = JsonConvert.DeserializeObject<Genoma.Models.Root>(url);
            if (Persona == null)
            {
                return(HttpNotFound());
            }
            return(View(Persona));
        }