コード例 #1
0
        //Call everytime the App starts
        public async Task SyncTableUpdates()
        {
            var result = await MobileService.GetTable <table_update>().Take(_takeNRows).ToListAsync();

            _liteConnection.DeleteAll <table_update>();
            foreach (var item in result)
            {
                //Convert to UTC
                item.updated_at = item.updated_at.ToUniversalTime();
                _liteConnection.Insert(item);
            }
        }
コード例 #2
0
        //Call everytime the App starts
        public async Task SyncTableUpdates()
        {
            try {
                var result = await MobileService.GetTable <table_update>().Where(t => t.id > 0).LoadAllAsync();

                Debug.WriteLine("********* &&&&& " + result.Count);
                // var result = await MobileService.GetTable<table_update>().Take(_takeNRows).ToListAsync();
                _liteConnection.DeleteAll <table_update>();
                foreach (var item in result)
                {
                    //Convert to UTC
                    item.updated_at = item.updated_at.ToUniversalTime();
                    _liteConnection.Insert(item);
                }
            } catch (Exception e) {
                throw(e);
            }
        }
コード例 #3
0
 public void DeleteAll()
 {
     _connection.DeleteAll <T>();
 }
コード例 #4
0
        public void CleanResults()
        {
            _connection.DeleteAll <Answer> ();

            _messenger.Publish(new ResultsChangedMessage(this, ResultsChangedMessage.ResultsCleared));
        }