public async Task <ActionResult <GetHeroDTO> > Create([FromBody] InsertHeroDTO dto)
        {
            var newHero = await _heroAppService.CreateHero(dto);

            return(CreatedAtAction("GetHeroById", new { id = newHero.Id }, newHero));
        }
예제 #2
0
 public async Task <ActionResult <GetHeroDTO> > Create([FromBody] InsertHeroDTO dto)
 {
     return(Ok(await _heroAppService.CreateHero(dto)));
 }