string connStr = ConfigurationManager.ConnectionStrings["MongoDBConnStr"].ConnectionString; var client = new MongoClient(connStr); var mdb = client.GetDatabase("GameCommonLog"); //类似于sql数据库 var coll=mdb.GetCollection<basic_Msg>("basic_Msg"); //类似于sql表