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(); }
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); }
public static void add_speaker(speaker speaker) { var store = new DataStore("speaker.json"); // Get employee collection store.GetCollection <speaker>().InsertOneAsync(speaker); store.Dispose(); }