You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-17Lines changed: 33 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,25 +10,20 @@
10
10
11
11
> 🤔💭 TLDR; By using QueryableValues, you can incorporate in-memory collections into your EF queries with outstanding performance and flexibility.
12
12
13
-
This library allows you to efficiently compose an [IEnumerable<T>] in your [Entity Framework Core] queries when using the [SQL Server Database Provider]. This is accomplished by using the `AsQueryableValues` extension method available on the [DbContext] class. Everything is evaluated on the server with a single round trip, in a way that preserves the query's [execution plan], even when the values behind the [IEnumerable<T>] are changed on subsequent executions.
13
+
This library allows you to efficiently compose an [IEnumerable<T>] in your [Entity Framework Core] queries when using the [SQL Server Database Provider]. You can accomplish this by using the `AsQueryableValues` extension method that's available on the [DbContext] class. The query is processed in a single round trip to the server, in a way that preserves its [execution plan], even when the values within the [IEnumerable<T>] are changed on subsequent executions.
- Can be a user-defined class or struct with read/write properties and a public constructor.
20
-
- Must have one or more simple type properties, including [Boolean].
15
+
**Highlights**
16
+
- ✨ Enables the composition of in-memory data within your queries, utilizing both simple and complex types.
17
+
- 👌 Works with all versions of SQL Server supported by [Entity Framework Core].
18
+
- ⚡ Automatically uses the most efficient strategy compatible with your SQL Server instance and configuration.
19
+
- ✅ Boasts over 140 tests for reliability and compatibility, giving you added confidence.
21
20
22
21
For a detailed explanation of the problem solved by QueryableValues, please continue reading [here][readme-background].
23
22
24
-
> ✅ QueryableValues boasts over 120 integration tests that are executed on every supported version of EF. These tests ensure reliability and compatibility, giving you added confidence.
25
-
26
23
> 💡 Still on Entity Framework 6 (non-core)? Then [QueryableValues `EF6 Edition`](https://github.com/yv989c/BlazarTech.QueryableValues.EF6) is what you need.
27
24
28
25
## When Should You Use It?
29
-
The `AsQueryableValues` extension method is intended for queries that are dependent upon a *non-constant* sequence of external values. In such cases, the underlying SQL query will be efficient on subsequent executions.
30
-
31
-
It provides a solution to the following long standing [EF Core issue](https://github.com/dotnet/efcore/issues/13617) and enables other currently unsupported scenarios; like the ability to efficiently create joins with in-memory data.
26
+
The `AsQueryableValues` extension method is intended for queries that are dependent upon a *non-constant* sequence of external values. It provides a solution to the following [EF Core issue](https://github.com/dotnet/efcore/issues/13617) and enables other currently unsupported scenarios; like the ability to efficiently create joins with in-memory data.
32
27
33
28
## Your Support is Appreciated!
34
29
If you feel that this solution has provided you some value, please consider [buying me a ☕][BuyMeACoffee].
@@ -83,7 +78,7 @@ public class Startup
83
78
}
84
79
}
85
80
```
86
-
> 💡 Pro-tip: `UseQueryableValues` offers an optional `options` delegate for additional configurations.
81
+
> 💡 `UseQueryableValues` offers an optional `options` delegate for additional configurations.
87
82
88
83
## How Do You Use It?
89
84
The `AsQueryableValues` extension method is provided by the `BlazarTech.QueryableValues` namespace; therefore, you must add the following `using` directive to your source code file for it to appear as a method of your [DbContext] instance:
@@ -96,6 +91,9 @@ using BlazarTech.QueryableValues;
96
91
Below are a few examples composing a query using the values provided by an [IEnumerable<T>].
> :warning: All the data provided by this type is transmitted to the server; therefore, ensure that it only contains the properties you need for your query. Not following this recommendation will degrade the query's performance.
190
+
> ⚠️ All the data provided by this type is transmitted to the server; therefore, ensure that it only contains the properties you need for your query. Not following this recommendation will degrade the query's performance.
175
191
176
-
> :warning: There is a limit of up to 10 properties for any given simple type (e.g. cannot have more than 10 [Int32] properties). Exceeding that limit will cause an exception and may also suggest that you should rethink your strategy.
192
+
> ⚠️ There is a limit of up to 10 properties for any given simple type (e.g. cannot have more than 10 [Int32] properties). Exceeding that limit will cause an exception and may also suggest that you should rethink your strategy.
177
193
178
194
# Benchmarks
179
195
The following [benchmarks] consist of simple EF Core queries that have a dependency on a random sequence of [Int32], [Guid], and [String] values via the `Contains` LINQ method. It shows the performance differences between not using and using QueryableValues. In practice, the benefits of using QueryableValues are more dramatic on complex EF Core queries and busy environments.
@@ -404,7 +420,7 @@ Now, focus your attention to the first query of the green section. Here you can
404
420
405
421
## What Makes This Work? 🤓
406
422
407
-
> 🎉 QueryableValues now supports JSON serialization, which improves its performance compared to using XML. By default, QueryableValues will attempt to use JSON if it is supported.
423
+
> 🎉 QueryableValues now supports JSON serialization, which improves its performance compared to using XML. By default, QueryableValues will attempt to use JSON if it is supported by your SQL Server instance and database configuration.
408
424
409
425
QueryableValues makes use of the XML parsing capabilities in SQL Server, which are available in all the supported versions of SQL Server to date. The provided sequence of values are serialized as XML and embedded in the underlying SQL query using a native XML parameter, then it uses SQL Server's XML type methods to project the query in a way that can be mapped by [Entity Framework Core].
Copy file name to clipboardExpand all lines: docs/README.md
+32-16Lines changed: 32 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,25 +6,20 @@
6
6
7
7
> 🤔💭 TLDR; By using QueryableValues, you can incorporate in-memory collections into your EF queries with outstanding performance and flexibility.
8
8
9
-
This library allows you to efficiently compose an [IEnumerable<T>] in your [Entity Framework Core] queries when using the [SQL Server Database Provider]. This is accomplished by using the `AsQueryableValues` extension method available on the [DbContext] class. Everything is evaluated on the server with a single round trip, in a way that preserves the query's [execution plan], even when the values behind the [IEnumerable<T>] are changed on subsequent executions.
9
+
This library allows you to efficiently compose an [IEnumerable<T>] in your [Entity Framework Core] queries when using the [SQL Server Database Provider]. You can accomplish this by using the `AsQueryableValues` extension method that's available on the [DbContext] class. The query is processed in a single round trip to the server, in a way that preserves its [execution plan], even when the values within the [IEnumerable<T>] are changed on subsequent executions.
- Can be a user-defined class or struct with read/write properties and a public constructor.
16
-
- Must have one or more simple type properties, including [Boolean].
11
+
**Highlights**
12
+
- ✨ Enables the composition of in-memory data within your queries, utilizing both simple and complex types.
13
+
- 👌 Works with all versions of SQL Server supported by [Entity Framework Core].
14
+
- ⚡ Automatically uses the most efficient strategy compatible with your SQL Server instance and configuration.
15
+
- ✅ Boasts over 140 tests for reliability and compatibility, giving you added confidence.
17
16
18
17
For a detailed explanation of the problem solved by QueryableValues, please continue reading [here][readme-background].
19
18
20
-
> ✅ QueryableValues boasts over 120 integration tests that are executed on every supported version of EF. These tests ensure reliability and compatibility, giving you added confidence.
21
-
22
19
> 💡 Still on Entity Framework 6 (non-core)? Then [QueryableValues `EF6 Edition`](https://github.com/yv989c/BlazarTech.QueryableValues.EF6) is what you need.
23
20
24
21
## When Should You Use It?
25
-
The `AsQueryableValues` extension method is intended for queries that are dependent upon a *non-constant* sequence of external values. In such cases, the underlying SQL query will be efficient on subsequent executions.
26
-
27
-
It provides a solution to the following long standing [EF Core issue](https://github.com/dotnet/efcore/issues/13617) and enables other currently unsupported scenarios; like the ability to efficiently create joins with in-memory data.
22
+
The `AsQueryableValues` extension method is intended for queries that are dependent upon a *non-constant* sequence of external values. It provides a solution to the following [EF Core issue](https://github.com/dotnet/efcore/issues/13617) and enables other currently unsupported scenarios; like the ability to efficiently create joins with in-memory data.
28
23
29
24
## Your Support is Appreciated!
30
25
If you feel that this solution has provided you some value, please consider [buying me a ☕][BuyMeACoffee].
@@ -79,7 +74,7 @@ public class Startup
79
74
}
80
75
}
81
76
```
82
-
> 💡 Pro-tip: `UseQueryableValues` offers an optional `options` delegate for additional configurations.
77
+
> 💡 `UseQueryableValues` offers an optional `options` delegate for additional configurations.
83
78
84
79
## How Do You Use It?
85
80
The `AsQueryableValues` extension method is provided by the `BlazarTech.QueryableValues` namespace; therefore, you must add the following `using` directive to your source code file for it to appear as a method of your [DbContext] instance:
@@ -92,6 +87,9 @@ using BlazarTech.QueryableValues;
92
87
Below are a few examples composing a query using the values provided by an [IEnumerable<T>].
> :warning: All the data provided by this type is transmitted to the server; therefore, ensure that it only contains the properties you need for your query. Not following this recommendation will degrade the query's performance.
186
+
> ⚠️ All the data provided by this type is transmitted to the server; therefore, ensure that it only contains the properties you need for your query. Not following this recommendation will degrade the query's performance.
171
187
172
-
> :warning: There is a limit of up to 10 properties for any given simple type (e.g. cannot have more than 10 [Int32] properties). Exceeding that limit will cause an exception and may also suggest that you should rethink your strategy.
188
+
> ⚠️ There is a limit of up to 10 properties for any given simple type (e.g. cannot have more than 10 [Int32] properties). Exceeding that limit will cause an exception and may also suggest that you should rethink your strategy.
173
189
174
190
## Do You Want To Know More? 📚
175
191
Please take a look at the [repository][Repository].
0 commit comments