Esempio n. 1
0
        public string Post([FromBody] dynamic value)
        {
            string json    = value.ToString();
            Hero   newHero = JsonConvert.DeserializeObject <Hero>(json);

            ModelDB.AddHero(new Hero(newHero.name));
            Console.WriteLine(newHero.name + " " + newHero.id);
            Console.WriteLine($"heroes size {ModelDB.Heroes.Count} {Hero.HeroList.Count}");
            ModelDB.LogHeroes();
            return("Hero Created");
        }