From 590271af9fc1dd51d81ee6c13a3a4a4fb96444f9 Mon Sep 17 00:00:00 2001 From: dlebee <36390643+dlebee@users.noreply.github.com> Date: Tue, 13 Feb 2018 23:13:01 -0600 Subject: [PATCH] Update README.md --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 3a3f2fb..cdff3eb 100644 --- a/README.md +++ b/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 (); +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"); +```