Example #1
0
        public static void update_speaker(speaker speaker)
        {
            var store = new DataStore("speaker.json");

            store.GetCollection <speaker>().ReplaceOneAsync(e => e.ID == speaker.ID, speaker);
            store.Dispose();
        }
Example #2
0
        public static speaker get_speaker(int id)
        {
            var store = new DataStore("speaker.json");

            speaker toReturn = store.GetCollection <speaker>().AsQueryable().FirstOrDefault(e => e.ID == id);

            store.Dispose();
            return(toReturn);
        }
Example #3
0
        public static void add_speaker(speaker speaker)
        {
            var store = new DataStore("speaker.json");

            // Get employee collection
            store.GetCollection <speaker>().InsertOneAsync(speaker);

            store.Dispose();
        }