Ejemplo n.º 1
0
        public IActionResult Create([FromForm] Player player)
        {
            var result = _repo.AddPlayer(player);

            if (result == 0)
            {
                return(View(player));
            }
            else
            {
                return(RedirectToAction("Index"));
            }
        }
Ejemplo n.º 2
0
 public int AddPlayer([FromBody] Player player)
 {
     return(_repo.AddPlayer(player));
 }