Example #1
0
        public Task BulkAddMatches(IList <Match> newMatches)
        {
            //numerate MatchId
            for (byte matchId = 0; matchId < newMatches.Count(); matchId++)
            {
                newMatches[matchId].MatchId = (byte)(matchId + 1);
            }

            return(_matchRepository.BatchUpsertAsync(_mapper.Map <IEnumerable <DataRepository.DataEntities.Match> >(newMatches)));
        }