コード例 #1
0
        public async Task <HandicapConfiguration> UpdateConfig(HandicapConfiguration config)
        {
            _context.Update(config);
            await _context.SaveChangesAsync();

            return(config);
        }
コード例 #2
0
        public async Task <MatchDay> Update(MatchDay matchDay)
        {
            if (matchDay == null)
            {
                throw new EntityNotFoundException($"Matchday with id {matchDay.Id} does not exist.");
            }

            _context.Update(matchDay);
            return(await Task.FromResult(matchDay));
        }
コード例 #3
0
        private async Task <Game> Update(Game game)
        {
            if (game == null)
            {
                throw new EntityNotFoundException(
                          $"Game with id {game.Id} not found."
                          );
            }

            _context.Update(game);

            return(await Task.FromResult(game));
        }
コード例 #4
0
        private async Task <Player> Update(Player player)
        {
            _context.Update(player);

            return(await Task.FromResult(player));
        }