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()); }
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()); }
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()); }
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()); }