public static void Save(PingMassage post) { using (var db = DbConnection) { db.Insert(post); } }
private async void AppServiceConnection_RequestReceivedAsync(AppServiceConnection sender, AppServiceRequestReceivedEventArgs args) { var reply = new PingMassage { PingId = _pingId, Date = _pingDate, IpAddress = Convert.ToString(args.Request.Message["host"]), Time = Convert.ToInt64(args.Request.Message["time"]), Size = Convert.ToInt32(args.Request.Message["size"]), Ttl = Convert.ToInt32(args.Request.Message["ttl"]), Response = Convert.ToString(args.Request.Message["response"]), }; await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => (PingCollaction ?? (PingCollaction = new ObservableCollection <PingMassage>())).Add(reply)); await NotifyUIAsync(() => SQLiteHelper.Save(reply)); }
public void SaveMassage(PingMassage post) { SQLiteHelper.Save(post); }