public ActionResult <Hero> Create(Hero hero) { return(_heroService.Create(hero)); }
public ActionResult <Hero> Create([FromBody] Hero hero) { Hero createdHero = _heroService.Create(hero); return(CreatedAtRoute("GetHero", new { id = hero.Id }, createdHero)); }
public async Task <IActionResult> Create([FromBody] Hero hero) { await _heroService.Create(hero); return(CreatedAtRoute("GetHero", new { id = hero.Id.ToString() }, hero)); }
public ActionResult <Hero> Create(Hero hero) { _heroService.Create(hero); return(CreatedAtRoute("GetHero", new { id = hero.Id.ToString() }, hero)); }