Example #1
0
        public IActionResult Delete(string id)
        {
            var usuario = _usuariosService.Get(id);

            if (usuario == null)
            {
                return(NotFound());
            }
            _usuariosService.Remove(usuario.Id);
            return(NoContent());
        }
Example #2
0
 public IActionResult Delete(int id)
 {
     _usuarioService.Remove(id);
     return(RedirectToAction(nameof(Index)));
 }