public IActionResult Post([FromBody] PokemonRace race) { if (race != null) { ctx.Races.Add(race); ctx.SaveChanges(); return(Created("", race)); } else { return(NotFound()); } }
public IActionResult Delete(int id) { PokemonRace race = ctx.Races.Find(id); if (race != null) { ctx.Races.Remove(race); return(Ok()); } else { return(NotFound()); } }