public IHttpActionResult AddSpell([FromBody] spell spell) { if (spell == null) { return(Ok("Spell Empty")); } _spellService = GetSpellService(); IEnumerable <string> Error = _spellService.AddSpell(spell); return(Ok(Error)); }
public async Task <IHttpActionResult> Post([FromBody] SpellViewModel spell) { var addedSpell = await Task.Run(() => _spellService.AddSpell(spell)); return(CreatedAtRoute("GetSpellById", new { id = addedSpell.Id }, addedSpell)); }