摘要:
本文描述了MySQL中的常用SQL语句在MongoDB中的写法,如果你长期使用MySQL而对MongoDB跃跃欲试,这篇简单的文章可以帮助你更快的进入角色。查询:MySQL:SELECT * FROM userMongo:db.user.find()MySQL:SELECT * FROM user WHERE name = ’starlee’Mongo:db.user.find({‘name’ : ’starlee’})插入:MySQL:INSERT INOT user (`name`, `age`) values (’starlee’,25)Mongo:db.user.insert({‘na 阅读全文
摘要:
protected virtual MongoConfigurationBuilder GetConfiguration() { var builder = new MongoConfigurationBuilder(); builder.ReadConnectionStringFromAppSettings("tests"); return builder; } //数据映射类(key,value) class ListInfo { public int key { get; set; } public object value { get; set; } } stati 阅读全文