![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MongoDB
夕降巫咸
这个作者很懒,什么都没留下…
展开
-
C#连接mongoDB以及增删改查(根据时间区间查询数据)
一、下载驱动MongoDB.Driver;MongoDB.Bson;两个驱动二、连接数据库string conn = "mongodb://localhost"; string database = "personName"; string collection = "Student"; MongoServer mongodb = MongoServer.Create(conn); // 连接数据...原创 2018-07-12 12:57:54 · 2628 阅读 · 1 评论 -
SQL Server数据表数据转存至mongoDB中
一、首先连接到sqlserver数据库,将需要转存的数据表中的列查询出来,存入到中 二、连接到mongoDB 三、将list中的数据循环取出,写入到mongoDB的集合中 List<StudentInfo> stuList = new List<StudentInfo>(); SqlConnection con = new SqlConnection(); c...原创 2018-07-24 15:15:17 · 1775 阅读 · 0 评论