public async Task <Entities.Player> AddPlayer(Entities.Player player)
        {
            var result = await _playerContext.AddAsync(player);

            return(result.Entity);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Finishes a match and sets PendingMath to false.
        /// </summary>
        /// <remarks>
        /// !The winner is considered the first id received.
        /// </remarks>
        /// <param name="id1">The winner's id</param>
        /// <param name="id2">The loser's id</param>
        /// <returns></returns>
        #endregion

        #region Aux Functions
        public async static Task AddPlayer(PlayerContext context, Player player)
        {
            await context.AddAsync <Player> (player);

            await context.SaveChangesAsync();
        }