public void AddPokestopTimestamp(Int64 ts) { if (!pokestopTimestampCollection.Exists(s => s.Timestamp == ts)) { var stat = new PokeStopTimestamp { Timestamp = ts }; pokestopTimestampCollection.Insert(stat); } }
public void AddPokestopTimestamp(Int64 ts) { using (var db = new LiteDatabase(GetDBPath(GetUsername()))) { if (!db.GetCollection <PokeStopTimestamp>(POKESTOP_STATS_COLLECTION).Exists(s => s.Timestamp == ts)) { var stat = new PokeStopTimestamp { Timestamp = ts }; db.GetCollection <PokeStopTimestamp>(POKESTOP_STATS_COLLECTION).Insert(stat); } } }