public RoundDto CreateRound(RoundDto round) { var roundWithCalculatedScore = CalculateRoundScore(round); var createdRound = _roundRepository.CreateRound(roundWithCalculatedScore); return(createdRound); }
//private Random _rnd = new Random(); //public string drawNumbers(int numLimit, int numAmount) //{ // return string.Join(",", // Enumerable // .Range(1, numLimit) // .OrderBy(x => _rnd.Next()) // .Take(numAmount)); //} public RoundViewModel ActivateRound() { var round = new RoundViewModel() { WinningCombination = _helper.GenerateNumbers(37, 7) }; var createdRound = new RoundResults() { WinningCombination = round.WinningCombination }; _roundRepository.CreateRound(createdRound); return(round); }