Exemplo n.º 1
0
        public async Task <int> DeleteByIdAsync(int id)
        {
            var player = await _context
                         .Players
                         .FindAsync(id);

            _context.Players.Remove(player);
            return(await _context.SaveChangesAsync());
        }
Exemplo n.º 2
0
        public async Task <int> DeleteByIdAsync(int id)
        {
            var game = await _context
                       .Games
                       .FindAsync(id);

            _context.Games.Remove(game);
            return(await _context.SaveChangesAsync());
        }