// Creates a Note and inserts it into the collection in MongoDB. public void CreateNote(Note note) { MongoCollection<Note> collection = GetNotesCollection(); try { collection.Insert(note); } catch (MongoCommandException ex) { string msg = ex.Message; } }
public void SaveNote(Note note) { //MongoCollection<Note> collection = GetNotesCollection(); //Expression<Func<Note, bool>> criteria = x => x.Id == try { } catch (MongoCommandException ex) { string msg = ex.Message; } }