Ejemplo n.º 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());
        }
Ejemplo n.º 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());
        }
Ejemplo n.º 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());
        }
Ejemplo n.º 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());
        }