private void Bus_OnReceived(object sender, BusEventArgs e) { var data = System.Text.Json.JsonSerializer.Deserialize <IEnumerable <IOTData> >(e.Message); lock (Program.lockdb) { using (var litedb = new LitedbWapper(DBFile)) { litedb.Insert <IOTData>(data); } } }
private void Bus_OnReceived(object sender, BusEventArgs e) { var data = System.Text.Json.JsonSerializer.Deserialize <IEnumerable <IOTData> >(e.Message); litedb.Insert <IOTData>(data); }