Beispiel #1
0
        public async Task DeleteSocietyPlayerAsync(SocietyPlayer societyPlayer)
        {
            if (societyPlayer.Id == null)
            {
                return;
            }

            await Initialize();

            try
            {
                await tableSocietyPlayer.DeleteAsync(societyPlayer);
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Unable to delete society Player: " + ex);
            }
        }
Beispiel #2
0
        public async Task SaveSocietyPlayerAsync(SocietyPlayer societyPlayer)
        {
            await Initialize();

            try
            {
                if (societyPlayer.Id == null)
                {
                    await tableSocietyPlayer.InsertAsync(societyPlayer);
                }
                else
                {
                    await tableSocietyPlayer.UpdateAsync(societyPlayer);
                }
                // await Syncsocieties();
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Unable to save society player: " + ex);
            }
        }