documentation.
This commit is contained in:
parent
dab0972881
commit
97926fdcb7
23
README.md
23
README.md
@ -2,7 +2,7 @@
|
|||||||
Adds extensions to Linq to offer dynamic queryables.
|
Adds extensions to Linq to offer dynamic queryables.
|
||||||
|
|
||||||
|
|
||||||
# Samples
|
## Samples
|
||||||
Complex Query
|
Complex Query
|
||||||
```csharp
|
```csharp
|
||||||
query = query.Query(q =>
|
query = query.Query(q =>
|
||||||
@ -16,18 +16,31 @@ query = query.Query(q =>
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
Simple Query
|
###Simple Query
|
||||||
```csharp
|
```csharp
|
||||||
query.Where("FirstName", ConditionOperators.Equal, "David");
|
query.Where("FirstName", ConditionOperators.Equal, "David");
|
||||||
```
|
```
|
||||||
|
|
||||||
Simple Sorting
|
###Simple Sorting
|
||||||
```csharp
|
```csharp
|
||||||
query = query.OrderByDescending("AuthorId");
|
query = query.OrderByDescending("AuthorId");
|
||||||
query = query.ThenBy("Id");
|
query = query.ThenBy("Id");
|
||||||
```
|
```
|
||||||
|
|
||||||
Null Checking automaticly (practical for in memory dynamic queries)
|
###Collection Filtering
|
||||||
|
You don't have to Worry about it.
|
||||||
|
The libary will do it for you.
|
||||||
|
```csharp
|
||||||
|
var query = authors.AsQueryable();
|
||||||
|
query = query.Query(qb =>
|
||||||
|
{
|
||||||
|
qb.NullChecking();
|
||||||
|
// you can specify here which collection handling you wish to use Any and All is supported for now.
|
||||||
|
qb.And("Posts.Comments.Email", ConditionOperators.Equal, "john.doe@me.com", collectionHandling: QueryCollectionHandling.Any);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
###Null Checking automaticly (practical for in memory dynamic queries)
|
||||||
```csharp
|
```csharp
|
||||||
var query = authors.AsQueryable();
|
var query = authors.AsQueryable();
|
||||||
query = query.Query(qb =>
|
query = query.Query(qb =>
|
||||||
@ -37,7 +50,7 @@ query = query.Query(qb =>
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
Using Query Builder
|
###Using Query Builder
|
||||||
```csharp
|
```csharp
|
||||||
// subject.
|
// subject.
|
||||||
var posts = new List<Post>()
|
var posts = new List<Post>()
|
||||||
|
Loading…
Reference in New Issue
Block a user