Skip to content

Commit f2d7bda

Browse files
committed
created static Query<TDocument> class. removed Build<TDocument> and Where<TDocument> from the static Query class.
1 parent 73539cf commit f2d7bda

File tree

6 files changed

+688
-406
lines changed

6 files changed

+688
-406
lines changed

Driver/Builders/QueryBuilder.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,6 @@ public static IMongoQuery Null
4040
}
4141

4242
// public static methods
43-
/// <summary>
44-
/// Builds a query using a strongly-typed query builder.
45-
/// </summary>
46-
/// <typeparam name="TDocument"></typeparam>
47-
/// <param name="queryBuilderFunction">A function that builds a query using the supplied query builder.</param>
48-
/// <returns>an IMongoQuery.</returns>
49-
public static IMongoQuery Build<TDocument>(Func<QueryBuilder<TDocument>, IMongoQuery> queryBuilderFunction)
50-
{
51-
var queryBuilder = new QueryBuilder<TDocument>();
52-
return queryBuilderFunction(queryBuilder);
53-
}
54-
5543
/// <summary>
5644
/// Tests that the named array element contains all of the values (see $all).
5745
/// </summary>
@@ -624,18 +612,6 @@ public static QueryComplete Where(BsonJavaScript javaScript)
624612
return new QueryComplete(new BsonDocument("$where", javaScript));
625613
}
626614

627-
/// <summary>
628-
/// Builds a query from an expression.
629-
/// </summary>
630-
/// <typeparam name="TDocument">The entity type.</typeparam>
631-
/// <param name="expression">The query.</param>
632-
/// <returns>An IMongoQuery.</returns>
633-
public static IMongoQuery Where<TDocument>(Expression<Func<TDocument, bool>> expression)
634-
{
635-
var builder = new QueryBuilder<TDocument>();
636-
return builder.Where(expression);
637-
}
638-
639615
/// <summary>
640616
/// Tests that the value of the named element is within a circle (see $within and $center).
641617
/// </summary>

0 commit comments

Comments
 (0)