Example #1
0
        public async Task <int> CreateAsyncMatch(CreateMatch matchData, int userId)  //metoda tworzaca nowy mecz
        {
            var user = await _authRepository.UserAccount(userId);

            //zera to wynik meczu zadeklarowane z gory
            var match = new Matchh(matchData.OpponentTeam, matchData.MatchDate, matchData.Place);

            match.user = user;
            int matchId = await _matchRepository.AddAsyncMatch(match, userId);

            return(matchId);
        }