上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 65 下一页
摘要: from:http://blog.csdn.net/feiyun0112/article/details/39697955 创建一个控制台程序和一个类库, 在控制台创建一个匿名对象,然后再在类库中访问它,代码如下: [csharp] view plain copy namespace ConsoleApplication1 { class Program ... 阅读全文
posted @ 2017-04-18 16:29 94cool 阅读(521) 评论(0) 推荐(0)
摘要: MongoDB docs have the answer: "When using $or with that are equality checks for the value of the same field, choose the $in operator over the $or operator." 阅读全文
posted @ 2017-04-17 20:21 94cool 阅读(3957) 评论(0) 推荐(0)
摘要: var queryDetail = new BsonDocument("cNo", doc.cNo); queryDetail.AddRange(new BsonDocument("Details.dDate", doc.oRDate)); //日表数组中存在相同报表日期的数据 ... 阅读全文
posted @ 2017-04-12 10:53 94cool 阅读(1233) 评论(0) 推荐(0)
摘要: C# mongodb $set或$addToSet批量更新很慢原因的解决方法:关键字段要建立索引 阅读全文
posted @ 2017-03-17 17:17 94cool 阅读(1270) 评论(0) 推荐(0)
摘要: from:http://www.cnblogs.com/gossip/p/4573056.html 一、None of the specified endpoints were reachable 这个异常在创建连接时抛出(CreateConnection()),原因一般是ConnectionFactory参数设置不对,比如HostName、UserName、Password 标准设置: ... 阅读全文
posted @ 2017-02-24 08:38 94cool 阅读(9186) 评论(0) 推荐(0)
摘要: from:https://my.oschina.net/chiyong/blog/289138 Mongodb 没有传统数据库的group函数,如果分组需要走MapReduce。这种MR与HadoopMR类似。下面看看Mongodb 的分组实现 现在又一张 表它的数据格式如下: { "_id" : 阅读全文
posted @ 2017-02-23 21:12 94cool 阅读(1234) 评论(0) 推荐(0)
摘要: /// <summary> /// 分页信息 /// </summary> public class PageInfo<T> { /// <summary> /// 分页信息 /// </summary> public PageInfo() { } /// <summary> /// 总页数 /// 阅读全文
posted @ 2017-02-21 16:31 94cool 阅读(8157) 评论(6) 推荐(0)
摘要: static async Task CreateIndex() { var client = new MongoClient(); var database = client.GetDatabase("HamsterSchool"); var collection = database.GetCollection("Hamsters"); await collect... 阅读全文
posted @ 2017-02-15 17:40 94cool 阅读(818) 评论(0) 推荐(0)
摘要: from:https://yq.aliyun.com/articles/8461?spm=5176.7937264.222114.10.s2oqcT 摘要: MongoDB复制集(Replica Set)通过存储多份数据副本来保证数据的高可靠,通过自动的主备切换机制来保证服务的高可用。**但需要注意的时,连接副本集的姿势如果不对,服务高可用将不复存在。** 使用复制集时你需要知道的 Mon... 阅读全文
posted @ 2017-02-15 15:44 94cool 阅读(612) 评论(0) 推荐(0)
摘要: public async Task CollectionExistsAsync(string collectionName) { var filter = new BsonDocument("name", collectionName); //filter by collection name var collections = await ... 阅读全文
posted @ 2017-02-15 15:21 94cool 阅读(1024) 评论(0) 推荐(0)
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 65 下一页