public IActionResult AddTeam([FromBody] TeamDto team) { var isTeamAdded = _dataStore.TryAddingTeam(team.ToEntity()); if (isTeamAdded) { _dataStore.SaveChanges(); return(Ok($"Team {team.Name} added successfully.")); } return(BadRequest()); }
public async Task <Team> GetTeam(int id) { TeamDto teamdto = await _TeamRepository.GetTeam(id); return(teamdto.ToEntity()); }