public ActionResult UpdateUserTeam(GameFootballTeamModel model) { var team = new GameFootballTeamDto { PlayerIds = model.PlayerIds, UserId = model.UserId }; userBetsService.UpdateTeam(team); return(Ok()); }
public void AddTeam(GameFootballTeamDto team) { foreach (var id in team.PlayerIds) { var t = new GameFootballTeam { PlayerId = id, UserId = team.UserId, RoundId = GetCurrentRoundId() }; gameFootballTeamRepository.Insert(t); } }
public void UpdateTeam(GameFootballTeamDto team) { RemoveUserTeam(team.UserId); AddTeam(team); }