Merge branch 'master' of https://github.com/PoweredSoft/DynamicLinq
This commit is contained in:
commit
8be7ed2e94
12
README.md
12
README.md
@ -77,3 +77,15 @@ queryBuilder.And(subQuery =>
|
||||
|
||||
query = queryBuilder.Build();
|
||||
```
|
||||
|
||||
### Entity Framework
|
||||
|
||||
Using PoweredSoft.DynamicLinq.EntityFramework it adds an helper that allows you to do the following.
|
||||
|
||||
```csharp
|
||||
var context = new <YOUR CONTEXT>();
|
||||
var queryable = context.Query(typeof(Author), q => q.Compare("FirstName", ConditionOperators.Equal, "David"));
|
||||
var result = queryable.ToListAsync().Result;
|
||||
var first = result.FirstOrDefault() as Author;
|
||||
Assert.AreEqual(first?.FirstName, "David");
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user