static void Main(string[] args) { var spellBootStrapper = new SpellBootstrapper(); Console.WriteLine("Getting Spells"); var spells = spellBootStrapper.GetSpells(); Console.WriteLine("Got " + spells.Count + " Spells"); foreach (var spell in spells) { // Console.WriteLine(spell.Name); } Console.WriteLine(spells.First().Description); Console.ReadKey(); }
public IActionResult Spell() { if (_repository.CollectionExists <Spell>().GetAwaiter().GetResult()) { return(Ok()); } ICollection <Spell> spellList = _spellBootstrapper.GetSpells(); try { _repository.Add(spellList).GetAwaiter().GetResult(); return(Ok()); } catch (Exception ex) { return(BadRequest(ex.Message)); } }