Update README.md

This commit is contained in:
dlebee 2018-02-13 23:13:01 -06:00 committed by GitHub
parent b348bdfe90
commit 590271af9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,3 +77,15 @@ queryBuilder.And(subQuery =>
query = queryBuilder.Build(); 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");
```