Esempio n. 1
0
        public ActionResult <Hero> GetById(string id)
        {
            var hero = _heroService.Get(id);

            if (hero == null)
            {
                return(NotFound());
            }

            return(hero);
        }
Esempio n. 2
0
 public ActionResult <List <Hero> > Get()
 {
     return(_heroService.Get());
 }
Esempio n. 3
0
 public async Task <IActionResult> Get()
 => Ok(await _heroService.Get());
Esempio n. 4
0
 public ActionResult <List <Hero> > Get(string name = null)
 {
     return(_heroService.Get(name));
 }