public ActionResult <Hero> GetById(string id) { var hero = _heroService.Get(id); if (hero == null) { return(NotFound()); } return(hero); }
public ActionResult <List <Hero> > Get() { return(_heroService.Get()); }
public async Task <IActionResult> Get() => Ok(await _heroService.Get());
public ActionResult <List <Hero> > Get(string name = null) { return(_heroService.Get(name)); }