public async Task <IActionResult> Create([FromBody] User user) { var usersList = _repo.GetAllUsers(); if (usersList.Equals(null)) { usersList = new List <User>(); } if (!usersList.Contains(user)) { _repo.AddUser(user); await _hubContext.Clients.All.SendAsync(user.Name + " criado com Sucesso"); return(Created("", user.Name)); } return(Forbid()); }