/// <summary>
/// 查询所有
/// </summary>
public static void SelectAll()
{
List<User> list = new List<User>();
//创建数据连接
MongoServer server = MongoServer.Create(conn);
//获取指定数据库
MongoDatabase db = server.GetDatabase(dbName);
//获取表
MongoCollection<User> col = db.GetCollection<User>(tbName);
//查询全部
list.AddRange(col.FindAll());
//--------------------------------
foreach (User t in col.FindAll())
{
string id = t.Id.ToString();
string text = t.Text;
DateTime dt = t.Createdate;
}
}