示例#1
0
        public static void MongoFind <T>(this List <T> List, string FieldName, object Value) where T : MongoMapper <T>
        {
            List.Clear();
            var col = new MongoMapperCollection <T>();

            col.Find(MongoQuery <T> .Eq(typeof(T).Name, FieldName, Value));
            List.AddRange(col.ToList());
        }
示例#2
0
        public static void MongoFind <T>(this List <T> List, FilterDefinition <T> Query) where T : MongoMapper <T>
        {
            List.Clear();
            var col = new MongoMapperCollection <T>();

            col.Find(Query);
            List.AddRange(col.ToList());
        }
示例#3
0
        public static void MongoFind <T>(this List <T> List, Expression <Func <T, object> > Field, object Value) where T : MongoMapper <T>
        {
            List.Clear();
            var col = new MongoMapperCollection <T>();

            col.Find(MongoQuery <T> .Eq(Field, Value));
            List.AddRange(col.ToList());
        }
示例#4
0
        public static void MongoFind <T>(this List <T> List) where T : MongoMapper <T>
        {
            List.Clear();
            var col = new MongoMapperCollection <T>();

            col.Find(new BsonDocument());
            List.AddRange(col.ToList());
        }