예제 #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);
            }
        }
예제 #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);
            }
        }