Exemplo n.º 1
0
        public virtual async void Save(Player player)
        {
            player = string.IsNullOrEmpty(player.ID)
                ? PlayersContext.Add(player).Entity
                : PlayersContext.Update(player).Entity;

            await PlayersContext.SaveChangesAsync();
        }
Exemplo n.º 2
0
 public PlayerRepository(PlayersContext playersContext)
 {
     PlayersContext = playersContext;
 }