diff --git a/DelegateDecompiler.sln b/DelegateDecompiler.sln index 295c66c1..dce65102 100644 --- a/DelegateDecompiler.sln +++ b/DelegateDecompiler.sln @@ -26,12 +26,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DelegateDecompiler.EntityFr EndProject Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "DelegateDecompiler.Tests.VB", "src\DelegateDecompiler.Tests.VB\DelegateDecompiler.Tests.VB.vbproj", "{19EC81F1-783D-4F53-BCB8-4F87BA3A28EC}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DelegateDecompiler.EntityFrameworkCore", "src\DelegateDecompiler.EntityFrameworkCore\DelegateDecompiler.EntityFrameworkCore.csproj", "{B0FE6AA7-2C34-42B7-9684-FB1229442761}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DelegateDecompiler.EntityFrameworkCore.Tests", "src\DelegateDecompiler.EntityFrameworkCore.Tests\DelegateDecompiler.EntityFrameworkCore.Tests.csproj", "{BE231144-9777-4DBD-B40D-BE65B24C04B4}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DelegateDecompiler.EntityFrameworkCore3.Tests", "src\DelegateDecompiler.EntityFrameworkCore3.Tests\DelegateDecompiler.EntityFrameworkCore3.Tests.csproj", "{B8F5E18F-723A-46FF-A7FB-7F25F95A62DD}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DelegateDecompiler.EntityFrameworkCore6.Tests", "src\DelegateDecompiler.EntityFrameworkCore6.Tests\DelegateDecompiler.EntityFrameworkCore6.Tests.csproj", "{0EC42D3F-C97B-4803-96BF-953B0139578C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DelegateDecompiler.EntityFrameworkCore5", "src\DelegateDecompiler.EntityFrameworkCore5\DelegateDecompiler.EntityFrameworkCore5.csproj", "{79DA2FBB-7A35-4AFF-A89B-CF8F5DADC1B2}" @@ -64,18 +58,6 @@ Global {19EC81F1-783D-4F53-BCB8-4F87BA3A28EC}.Debug|Any CPU.Build.0 = Debug|Any CPU {19EC81F1-783D-4F53-BCB8-4F87BA3A28EC}.Release|Any CPU.ActiveCfg = Release|Any CPU {19EC81F1-783D-4F53-BCB8-4F87BA3A28EC}.Release|Any CPU.Build.0 = Release|Any CPU - {B0FE6AA7-2C34-42B7-9684-FB1229442761}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B0FE6AA7-2C34-42B7-9684-FB1229442761}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B0FE6AA7-2C34-42B7-9684-FB1229442761}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B0FE6AA7-2C34-42B7-9684-FB1229442761}.Release|Any CPU.Build.0 = Release|Any CPU - {BE231144-9777-4DBD-B40D-BE65B24C04B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BE231144-9777-4DBD-B40D-BE65B24C04B4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BE231144-9777-4DBD-B40D-BE65B24C04B4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BE231144-9777-4DBD-B40D-BE65B24C04B4}.Release|Any CPU.Build.0 = Release|Any CPU - {B8F5E18F-723A-46FF-A7FB-7F25F95A62DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B8F5E18F-723A-46FF-A7FB-7F25F95A62DD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B8F5E18F-723A-46FF-A7FB-7F25F95A62DD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B8F5E18F-723A-46FF-A7FB-7F25F95A62DD}.Release|Any CPU.Build.0 = Release|Any CPU {0EC42D3F-C97B-4803-96BF-953B0139578C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0EC42D3F-C97B-4803-96BF-953B0139578C}.Debug|Any CPU.Build.0 = Debug|Any CPU {0EC42D3F-C97B-4803-96BF-953B0139578C}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/README.md b/README.md index 1bb00f6d..8d877376 100644 --- a/README.md +++ b/README.md @@ -72,10 +72,6 @@ If you are using ORM specific features, like EF's `Include`, `AsNoTracking` or N The [DelegateDecompiler.EntityFramework](https://nuget.org/packages/DelegateDecompiler.EntityFramework) package provides `DecompileAsync` extension method which adds support for EF's Async operations. -### Async Support with [EntityFramework Core 2.0-3.1](https://www.nuget.org/packages/DelegateDecompiler.EntityFrameworkCore) - -The [DelegateDecompiler.EntityFrameworkCore](https://nuget.org/packages/DelegateDecompiler.EntityFrameworkCore) package provides `DecompileAsync` extension method which adds support for EF's Async operations. - ### Async Support with [EntityFramework Core 5.0 and later](https://www.nuget.org/packages/DelegateDecompiler.EntityFrameworkCore5) The [DelegateDecompiler.EntityFrameworkCore5](https://nuget.org/packages/DelegateDecompiler.EntityFrameworkCore5) package provides `DecompileAsync` extension method which adds support for EF's Async operations. @@ -86,7 +82,6 @@ Available on [NuGet](https://nuget.org/) * Install-Package [DelegateDecompiler](https://nuget.org/packages/DelegateDecompiler) * Install-Package [DelegateDecompiler.EntityFramework](https://nuget.org/packages/DelegateDecompiler.EntityFramework) -* Install-Package [DelegateDecompiler.EntityFrameworkCore](https://nuget.org/packages/DelegateDecompiler.EntityFrameworkCore) * Install-Package [DelegateDecompiler.EntityFrameworkCore5](https://nuget.org/packages/DelegateDecompiler.EntityFrameworkCore5) # License diff --git a/src/DelegateDecompiler.EntityFrameworkCore.Tests/DelegateDecompiler.EntityFrameworkCore.Tests.csproj b/src/DelegateDecompiler.EntityFrameworkCore.Tests/DelegateDecompiler.EntityFrameworkCore.Tests.csproj deleted file mode 100644 index a377d171..00000000 --- a/src/DelegateDecompiler.EntityFrameworkCore.Tests/DelegateDecompiler.EntityFrameworkCore.Tests.csproj +++ /dev/null @@ -1,39 +0,0 @@ - - - net8.0 - Copyright © Dave Glick 2014, Jon Smith 2014, Alexander Zaytsev 2014 - 2021 - $(DefineConstants);EF_CORE - DelegateDecompiler.EntityFramework.Tests - - - - - - %(Name) - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/DelegateDecompiler.EntityFrameworkCore.Tests/EntityTypeConfigurationExtensionsTests.cs b/src/DelegateDecompiler.EntityFrameworkCore.Tests/EntityTypeConfigurationExtensionsTests.cs deleted file mode 100644 index 42cfa3be..00000000 --- a/src/DelegateDecompiler.EntityFrameworkCore.Tests/EntityTypeConfigurationExtensionsTests.cs +++ /dev/null @@ -1,71 +0,0 @@ -using DelegateDecompiler.EntityFrameworkCore; -using DelegateDecompiler.Tests; -using Microsoft.EntityFrameworkCore.Metadata.Builders; -using NUnit.Framework; - -namespace DelegateDecompiler.EntityFramework.Tests -{ - public class EntityTypeBuilderExtensionsTests : ConfigurationTestsBase - { - [Test] - public void ComputedShouldRegisterPropertyAsDecompileable() - { - Assert.Null(InstanceGetter()); - var configuration = new DefaultConfiguration(); - Configuration.Configure(configuration); - - default(EntityTypeBuilder).Computed(x => x.Property); - - Assert.IsTrue(configuration.ShouldDecompile(typeof(TestClass).GetProperty(nameof(TestClass.Property)))); - } - - [Test] - public void ComputedShouldRegisterMethodAsDecompileable() - { - Assert.Null(InstanceGetter()); - var configuration = new DefaultConfiguration(); - Configuration.Configure(configuration); - - default(EntityTypeBuilder).Computed(x => x.Method()); - - Assert.IsTrue(configuration.ShouldDecompile(typeof(TestClass).GetMethod(nameof(TestClass.Method)))); - } - - [Test] - public void ComputedShouldThrowExceptionIfUnsupportedExpression() - { - Assert.Null(InstanceGetter()); - var configuration = new DefaultConfiguration(); - Configuration.Configure(configuration); - - Assert.That(() => - { - default(EntityTypeBuilder).Computed(x => x.Property == 0); - }, Throws.ArgumentException); - } - - [Test] - public void ComputedShouldThrowExceptionIfUnsupportedMemberInfo() - { - Assert.Null(InstanceGetter()); - var configuration = new DefaultConfiguration(); - Configuration.Configure(configuration); - - Assert.That(() => - { - default(EntityTypeBuilder).Computed(x => x.Field); - }, Throws.InvalidOperationException); - } - - class TestClass - { - public int Field = 1; - public int Property { get { return Field; } } - - public int Method() - { - return Field; - } - } - } -} diff --git a/src/DelegateDecompiler.EntityFrameworkCore.Tests/GeneratedDocumentation/DetailedListOfSupportedCommands.md b/src/DelegateDecompiler.EntityFrameworkCore.Tests/GeneratedDocumentation/DetailedListOfSupportedCommands.md deleted file mode 100644 index 18b3dd6f..00000000 --- a/src/DelegateDecompiler.EntityFrameworkCore.Tests/GeneratedDocumentation/DetailedListOfSupportedCommands.md +++ /dev/null @@ -1,153 +0,0 @@ -Detail of supported commands -============ -## Documentation produced for DelegateDecompiler, version 0.33.0.0 on Thursday, 02 May 2024 21:09 - -This file documents what linq commands **DelegateDecompiler** supports when -working with [Entity Framework Core](https://docs.microsoft.com/en-us/ef/core/) (EF). -EF has one of the best implementations for converting Linq `IQueryable<>` commands into database -access commands, in EF's case T-SQL. Therefore it is a good candidate for using in our tests. - -This documentation was produced by compaired direct EF Linq queries against the same query implemented -as a DelegateDecompiler's `Computed` properties. This produces a Supported/Not Supported flag -on each command type tested. Tests are groups and ordered to try and make finding things -easier. - -So, if you want to use DelegateDecompiler and are not sure whether the linq command -you want to use will work then clone this project and write your own tests. -(See [How to add a test](HowToAddMoreTests.md) documentation on how to do this). -If there is a problem then please fork the repository and add your own tests. -That will make it much easier to diagnose your issue. - -*Note: The test suite has only recently been set up and has only a handful of tests at the moment. -More will appear as we move forward.* - - -### Group: Basic Features -#### [Select](../TestGroup05BasicFeatures/Test01Select.cs): -- Supported - * Bool Equals Constant (line 34) - * Bool Equals Static Variable (line 53) - * Int Equals Constant (line 70) - * Select Property Without Computed Attribute (line 87) - * Select Method Without Computed Attribute (line 104) - * Select Abstract Member Over Tph Hierarchy (line 121) - * Select Abstract Member Over Tph Hierarchy After Restricting To Subtype (line 138) - * Select Abstract Member Over Tph Hierarchy With Generic Classes After Restricting To Subtype (line 156) - * Select Abstract Member With Condition On It Over Tph Hierarchy With Generic Classes After Restricting To Subtype (line 181) - * Select Multiple Levels Of Abstract Members Over Tph Hierarchy (line 199) - -#### [Select Async](../TestGroup05BasicFeatures/Test02SelectAsync.cs): -- Supported - * Async (line 39) - * Bool Equals Constant Async (line 75) - * Decompile Upfront Bool Equals Constant Async (line 92) - * Bool Equals Static Variable To Array Async (line 111) - * Int Equals Constant (line 128) - -#### [Equals And Not Equals](../TestGroup05BasicFeatures/Test03EqualsAndNotEquals.cs): -- Supported - * Int Equals Constant (line 32) - * Int Equals Static Variable (line 50) - * Int Equals String Length (line 67) - * Int Not Equals String Length (line 84) - -#### [Nullable](../TestGroup05BasicFeatures/Test04Nullable.cs): -- Supported - * Property Is Null (line 35) - * Bool Equals Static Variable (line 54) - * Int Equals Constant (line 71) - * Nullable Init (line 88) - * Nullable Add (line 105) - -#### [Where](../TestGroup05BasicFeatures/Test05Where.cs): -- Supported - * Where Bool Equals Constant (line 33) - * Where Bool Equals Static Variable (line 52) - * Where Int Equals Constant (line 69) - * Where Filters On Abstract Members Over Tph Hierarchy (line 86) - * Where Filters On Multiple Levels Of Abstract Members Over Tph Hierarchy (line 104) - -#### [Single](../TestGroup05BasicFeatures/Test10Single.cs): -- Supported - * Single Int Equals Unique Value (line 40) - -#### [Single Async](../TestGroup05BasicFeatures/Test11SingleAsync.cs): -- Supported - * Single Int Equals Unique Value Async (line 46) - - -### Group: Order Take -#### [Order By](../TestGroup10OrderTake/Test01OrderBy.cs): -- Supported - * Order By Children Count (line 33) - * Order By Children Count Then By String Length (line 51) - * Where Any Children Then Order By Children Count (line 69) - -#### [Skip Take](../TestGroup10OrderTake/Test02SkipTake.cs): -- Supported - * Order By Children Count Then Take (line 33) - * Order By Children Count Then Skip And Take (line 51) - * Where Any Children Then Order By Then Skip Take (line 69) - - -### Group: Quantifier Operators -#### [Any](../TestGroup12QuantifierOperators/Test01Any.cs): -- Supported - * Any Children (line 32) - * Any Children With Filter (line 49) - -#### [All](../TestGroup12QuantifierOperators/Test02All.cs): -- Supported - * Singleton All Filter (line 32) - * All Filter On Children Int (line 49) - -#### [Contains](../TestGroup12QuantifierOperators/Test03Contains.cs): -- Supported - * String Contains Constant String With Filter (line 33) - - -### Group: Aggregation -#### [Count](../TestGroup15Aggregation/Test01Count.cs): -- Supported - * Count Children (line 33) - * Count Children With Filter (line 51) - * Count Children With Filter By Closure (line 69) - * Count Children With Filter By External Closure (line 88) - * Count Children With Filter By External Closure2 (line 108) - * Singleton Count Children With Filter (line 126) - -#### [Sum](../TestGroup15Aggregation/Test02Sum.cs): -- Supported - * Singleton Sum Children (line 34) - * Sum Count In Children Where Children Can Be None (line 53) - -#### [Count Async](../TestGroup15Aggregation/Test03CountAsync.cs): -- Supported - * Count Children Async (line 40) - * Count Children With Filter Async (line 58) - * Count Children With Filter By Closure Async (line 76) - * Count Children With Filter By External Closure Async (line 95) - * Count Children With Filter By External Closure2 Async (line 115) - * Singleton Count Children With Filter Async (line 133) - - -### Group: Types -#### [Strings](../TestGroup50Types/Test01Strings.cs): -- Supported - * Concatenate Person Not Handle Null (line 32) - * Concatenate Person Handle Null (line 49) - * Concatenate Person Handle Name Order (line 68) - * Select Generic Method Person Handle (line 85) - * Filter Generic Method Person Handle (line 99) - -#### [DateTime](../TestGroup50Types/Test05DateTime.cs): -- Supported - * DateTime Where Compare With Static Variable (line 35) - - -### Group: Additional Features -#### [Nested Expressions](../TestGroup90AdditionalFeatures/Test01NestedExpressions.cs): - - - -The End diff --git a/src/DelegateDecompiler.EntityFrameworkCore.Tests/GeneratedDocumentation/DetailedListOfSupportedCommandsWithSQL.md b/src/DelegateDecompiler.EntityFrameworkCore.Tests/GeneratedDocumentation/DetailedListOfSupportedCommandsWithSQL.md deleted file mode 100644 index 1f0e4450..00000000 --- a/src/DelegateDecompiler.EntityFrameworkCore.Tests/GeneratedDocumentation/DetailedListOfSupportedCommandsWithSQL.md +++ /dev/null @@ -1,525 +0,0 @@ -Detail With Sql of supported commands -============ -## Documentation produced for DelegateDecompiler, version 0.33.0.0 on Thursday, 02 May 2024 21:09 - -This file documents what linq commands **DelegateDecompiler** supports when -working with [Entity Framework Core](https://docs.microsoft.com/en-us/ef/core/) (EF). -EF has one of the best implementations for converting Linq `IQueryable<>` commands into database -access commands, in EF's case T-SQL. Therefore it is a good candidate for using in our tests. - -This documentation was produced by compaired direct EF Linq queries against the same query implemented -as a DelegateDecompiler's `Computed` properties. This produces a Supported/Not Supported flag -on each command type tested. Tests are groups and ordered to try and make finding things -easier. - -So, if you want to use DelegateDecompiler and are not sure whether the linq command -you want to use will work then clone this project and write your own tests. -(See [How to add a test](HowToAddMoreTests.md) documentation on how to do this). -If there is a problem then please fork the repository and add your own tests. -That will make it much easier to diagnose your issue. - -*Note: The test suite has only recently been set up and has only a handful of tests at the moment. -More will appear as we move forward.* - - -### Group: Basic Features -#### [Select](../TestGroup05BasicFeatures/Test01Select.cs): -- Supported - * Bool Equals Constant (line 34) - * T-Sql executed is - -```SQL - -``` - - * Bool Equals Static Variable (line 53) - * T-Sql executed is - -```SQL - -``` - - * Int Equals Constant (line 70) - * T-Sql executed is - -```SQL - -``` - - * Select Property Without Computed Attribute (line 87) - * T-Sql executed is - -```SQL - -``` - - * Select Method Without Computed Attribute (line 104) - * T-Sql executed is - -```SQL - -``` - - * Select Abstract Member Over Tph Hierarchy (line 121) - * T-Sql executed is - -```SQL - -``` - - * Select Abstract Member Over Tph Hierarchy After Restricting To Subtype (line 138) - * T-Sql executed is - -```SQL - -``` - - * Select Abstract Member Over Tph Hierarchy With Generic Classes After Restricting To Subtype (line 156) - * T-Sql executed is - -```SQL - -``` - - * Select Abstract Member With Condition On It Over Tph Hierarchy With Generic Classes After Restricting To Subtype (line 181) - * T-Sql executed is - -```SQL - -``` - - * Select Multiple Levels Of Abstract Members Over Tph Hierarchy (line 199) - * T-Sql executed is - -```SQL - -``` - - -#### [Select Async](../TestGroup05BasicFeatures/Test02SelectAsync.cs): -- Supported - * Async (line 39) - * T-Sql executed is - -```SQL - -``` - - * Bool Equals Constant Async (line 75) - * T-Sql executed is - -```SQL - -``` - - * Decompile Upfront Bool Equals Constant Async (line 92) - * T-Sql executed is - -```SQL - -``` - - * Bool Equals Static Variable To Array Async (line 111) - * T-Sql executed is - -```SQL - -``` - - * Int Equals Constant (line 128) - * T-Sql executed is - -```SQL - -``` - - -#### [Equals And Not Equals](../TestGroup05BasicFeatures/Test03EqualsAndNotEquals.cs): -- Supported - * Int Equals Constant (line 32) - * T-Sql executed is - -```SQL - -``` - - * Int Equals Static Variable (line 50) - * T-Sql executed is - -```SQL - -``` - - * Int Equals String Length (line 67) - * T-Sql executed is - -```SQL - -``` - - * Int Not Equals String Length (line 84) - * T-Sql executed is - -```SQL - -``` - - -#### [Nullable](../TestGroup05BasicFeatures/Test04Nullable.cs): -- Supported - * Property Is Null (line 35) - * T-Sql executed is - -```SQL - -``` - - * Bool Equals Static Variable (line 54) - * T-Sql executed is - -```SQL - -``` - - * Int Equals Constant (line 71) - * T-Sql executed is - -```SQL - -``` - - * Nullable Init (line 88) - * T-Sql executed is - -```SQL - -``` - - * Nullable Add (line 105) - * T-Sql executed is - -```SQL - -``` - - -#### [Where](../TestGroup05BasicFeatures/Test05Where.cs): -- Supported - * Where Bool Equals Constant (line 33) - * T-Sql executed is - -```SQL - -``` - - * Where Bool Equals Static Variable (line 52) - * T-Sql executed is - -```SQL - -``` - - * Where Int Equals Constant (line 69) - * T-Sql executed is - -```SQL - -``` - - * Where Filters On Abstract Members Over Tph Hierarchy (line 86) - * T-Sql executed is - -```SQL - -``` - - * Where Filters On Multiple Levels Of Abstract Members Over Tph Hierarchy (line 104) - * T-Sql executed is - -```SQL - -``` - - -#### [Single](../TestGroup05BasicFeatures/Test10Single.cs): -- Supported - * Single Int Equals Unique Value (line 40) - * T-Sql executed is - -```SQL - -``` - - -#### [Single Async](../TestGroup05BasicFeatures/Test11SingleAsync.cs): -- Supported - * Single Int Equals Unique Value Async (line 46) - * T-Sql executed is - -```SQL - -``` - - - -### Group: Order Take -#### [Order By](../TestGroup10OrderTake/Test01OrderBy.cs): -- Supported - * Order By Children Count (line 33) - * T-Sql executed is - -```SQL - -``` - - * Order By Children Count Then By String Length (line 51) - * T-Sql executed is - -```SQL - -``` - - * Where Any Children Then Order By Children Count (line 69) - * T-Sql executed is - -```SQL - -``` - - -#### [Skip Take](../TestGroup10OrderTake/Test02SkipTake.cs): -- Supported - * Order By Children Count Then Take (line 33) - * T-Sql executed is - -```SQL - -``` - - * Order By Children Count Then Skip And Take (line 51) - * T-Sql executed is - -```SQL - -``` - - * Where Any Children Then Order By Then Skip Take (line 69) - * T-Sql executed is - -```SQL - -``` - - - -### Group: Quantifier Operators -#### [Any](../TestGroup12QuantifierOperators/Test01Any.cs): -- Supported - * Any Children (line 32) - * T-Sql executed is - -```SQL - -``` - - * Any Children With Filter (line 49) - * T-Sql executed is - -```SQL - -``` - - -#### [All](../TestGroup12QuantifierOperators/Test02All.cs): -- Supported - * Singleton All Filter (line 32) - * T-Sql executed is - -```SQL - -``` - - * All Filter On Children Int (line 49) - * T-Sql executed is - -```SQL - -``` - - -#### [Contains](../TestGroup12QuantifierOperators/Test03Contains.cs): -- Supported - * String Contains Constant String With Filter (line 33) - * T-Sql executed is - -```SQL - -``` - - - -### Group: Aggregation -#### [Count](../TestGroup15Aggregation/Test01Count.cs): -- Supported - * Count Children (line 33) - * T-Sql executed is - -```SQL - -``` - - * Count Children With Filter (line 51) - * T-Sql executed is - -```SQL - -``` - - * Count Children With Filter By Closure (line 69) - * T-Sql executed is - -```SQL - -``` - - * Count Children With Filter By External Closure (line 88) - * T-Sql executed is - -```SQL - -``` - - * Count Children With Filter By External Closure2 (line 108) - * T-Sql executed is - -```SQL - -``` - - * Singleton Count Children With Filter (line 126) - * T-Sql executed is - -```SQL - -``` - - -#### [Sum](../TestGroup15Aggregation/Test02Sum.cs): -- Supported - * Singleton Sum Children (line 34) - * T-Sql executed is - -```SQL - -``` - - * Sum Count In Children Where Children Can Be None (line 53) - * T-Sql executed is - -```SQL - -``` - - -#### [Count Async](../TestGroup15Aggregation/Test03CountAsync.cs): -- Supported - * Count Children Async (line 40) - * T-Sql executed is - -```SQL - -``` - - * Count Children With Filter Async (line 58) - * T-Sql executed is - -```SQL - -``` - - * Count Children With Filter By Closure Async (line 76) - * T-Sql executed is - -```SQL - -``` - - * Count Children With Filter By External Closure Async (line 95) - * T-Sql executed is - -```SQL - -``` - - * Count Children With Filter By External Closure2 Async (line 115) - * T-Sql executed is - -```SQL - -``` - - * Singleton Count Children With Filter Async (line 133) - * T-Sql executed is - -```SQL - -``` - - - -### Group: Types -#### [Strings](../TestGroup50Types/Test01Strings.cs): -- Supported - * Concatenate Person Not Handle Null (line 32) - * T-Sql executed is - -```SQL - -``` - - * Concatenate Person Handle Null (line 49) - * T-Sql executed is - -```SQL - -``` - - * Concatenate Person Handle Name Order (line 68) - * T-Sql executed is - -```SQL - -``` - - * Select Generic Method Person Handle (line 85) - * T-Sql executed is - -```SQL - -``` - - * Filter Generic Method Person Handle (line 99) - * T-Sql executed is - -```SQL - -``` - - -#### [DateTime](../TestGroup50Types/Test05DateTime.cs): -- Supported - * DateTime Where Compare With Static Variable (line 35) - * T-Sql executed is - -```SQL - -``` - - - -### Group: Additional Features -#### [Nested Expressions](../TestGroup90AdditionalFeatures/Test01NestedExpressions.cs): - - - -The End diff --git a/src/DelegateDecompiler.EntityFrameworkCore.Tests/GeneratedDocumentation/DocumentationHeaderText.md b/src/DelegateDecompiler.EntityFrameworkCore.Tests/GeneratedDocumentation/DocumentationHeaderText.md deleted file mode 100644 index 3a89a85d..00000000 --- a/src/DelegateDecompiler.EntityFrameworkCore.Tests/GeneratedDocumentation/DocumentationHeaderText.md +++ /dev/null @@ -1,20 +0,0 @@ - -This file documents what linq commands **DelegateDecompiler** supports when -working with [Entity Framework Core](https://docs.microsoft.com/en-us/ef/core/) (EF). -EF has one of the best implementations for converting Linq `IQueryable<>` commands into database -access commands, in EF's case T-SQL. Therefore it is a good candidate for using in our tests. - -This documentation was produced by compaired direct EF Linq queries against the same query implemented -as a DelegateDecompiler's `Computed` properties. This produces a Supported/Not Supported flag -on each command type tested. Tests are groups and ordered to try and make finding things -easier. - -So, if you want to use DelegateDecompiler and are not sure whether the linq command -you want to use will work then clone this project and write your own tests. -(See [How to add a test](HowToAddMoreTests.md) documentation on how to do this). -If there is a problem then please fork the repository and add your own tests. -That will make it much easier to diagnose your issue. - -*Note: The test suite has only recently been set up and has only a handful of tests at the moment. -More will appear as we move forward.* - diff --git a/src/DelegateDecompiler.EntityFrameworkCore.Tests/GeneratedDocumentation/SummaryOfSupportedCommands.md b/src/DelegateDecompiler.EntityFrameworkCore.Tests/GeneratedDocumentation/SummaryOfSupportedCommands.md deleted file mode 100644 index 6dbe5e13..00000000 --- a/src/DelegateDecompiler.EntityFrameworkCore.Tests/GeneratedDocumentation/SummaryOfSupportedCommands.md +++ /dev/null @@ -1,60 +0,0 @@ -Summary of supported commands -============ -## Documentation produced for DelegateDecompiler, version 0.33.0.0 on Thursday, 02 May 2024 21:09 - -This file documents what linq commands **DelegateDecompiler** supports when -working with [Entity Framework Core](https://docs.microsoft.com/en-us/ef/core/) (EF). -EF has one of the best implementations for converting Linq `IQueryable<>` commands into database -access commands, in EF's case T-SQL. Therefore it is a good candidate for using in our tests. - -This documentation was produced by compaired direct EF Linq queries against the same query implemented -as a DelegateDecompiler's `Computed` properties. This produces a Supported/Not Supported flag -on each command type tested. Tests are groups and ordered to try and make finding things -easier. - -So, if you want to use DelegateDecompiler and are not sure whether the linq command -you want to use will work then clone this project and write your own tests. -(See [How to add a test](HowToAddMoreTests.md) documentation on how to do this). -If there is a problem then please fork the repository and add your own tests. -That will make it much easier to diagnose your issue. - -*Note: The test suite has only recently been set up and has only a handful of tests at the moment. -More will appear as we move forward.* - - -### Group: Basic Features -- Supported - * [Select](../TestGroup05BasicFeatures/Test01Select.cs) (10 tests) - * [Select Async](../TestGroup05BasicFeatures/Test02SelectAsync.cs) (5 tests) - * [Equals And Not Equals](../TestGroup05BasicFeatures/Test03EqualsAndNotEquals.cs) (4 tests) - * [Nullable](../TestGroup05BasicFeatures/Test04Nullable.cs) (5 tests) - * [Where](../TestGroup05BasicFeatures/Test05Where.cs) (5 tests) - * [Single](../TestGroup05BasicFeatures/Test10Single.cs) (1 tests) - * [Single Async](../TestGroup05BasicFeatures/Test11SingleAsync.cs) (1 tests) - -### Group: Order Take -- Supported - * [Order By](../TestGroup10OrderTake/Test01OrderBy.cs) (3 tests) - * [Skip Take](../TestGroup10OrderTake/Test02SkipTake.cs) (3 tests) - -### Group: Quantifier Operators -- Supported - * [Any](../TestGroup12QuantifierOperators/Test01Any.cs) (2 tests) - * [All](../TestGroup12QuantifierOperators/Test02All.cs) (2 tests) - * [Contains](../TestGroup12QuantifierOperators/Test03Contains.cs) (1 tests) - -### Group: Aggregation -- Supported - * [Count](../TestGroup15Aggregation/Test01Count.cs) (6 tests) - * [Sum](../TestGroup15Aggregation/Test02Sum.cs) (2 tests) - * [Count Async](../TestGroup15Aggregation/Test03CountAsync.cs) (6 tests) - -### Group: Types -- Supported - * [Strings](../TestGroup50Types/Test01Strings.cs) (5 tests) - * [DateTime](../TestGroup50Types/Test05DateTime.cs) (1 tests) - -### Group: Additional Features - - -The End diff --git a/src/DelegateDecompiler.EntityFrameworkCore.Tests/GeneratedDocumentation/Test file - please ignore.txt b/src/DelegateDecompiler.EntityFrameworkCore.Tests/GeneratedDocumentation/Test file - please ignore.txt deleted file mode 100644 index 875c32fa..00000000 --- a/src/DelegateDecompiler.EntityFrameworkCore.Tests/GeneratedDocumentation/Test file - please ignore.txt +++ /dev/null @@ -1 +0,0 @@ -This is a Unit Test of the MarkupFileHelpers \ No newline at end of file diff --git a/src/DelegateDecompiler.EntityFrameworkCore/AsyncDecompiledQueryProvider.cs b/src/DelegateDecompiler.EntityFrameworkCore/AsyncDecompiledQueryProvider.cs deleted file mode 100644 index 37e48023..00000000 --- a/src/DelegateDecompiler.EntityFrameworkCore/AsyncDecompiledQueryProvider.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; -using System.Reflection; -using System.Threading; -using System.Threading.Tasks; -#if NET5_0 -using Microsoft.EntityFrameworkCore.Query; -#endif -using Microsoft.EntityFrameworkCore.Query.Internal; - -namespace DelegateDecompiler.EntityFrameworkCore -{ - class AsyncDecompiledQueryProviderBase : DecompiledQueryProvider - { - static readonly MethodInfo OpenGenericExecuteAsync2 = typeof(IAsyncQueryProvider) - .GetMethod("ExecuteAsync", new[] { typeof(Expression), typeof(CancellationToken) }); - - static readonly MethodInfo OpenGenericExecuteAsync1 = typeof(IAsyncQueryProvider) - .GetMethod("ExecuteAsync", new[] { typeof(Expression) }); - - protected AsyncDecompiledQueryProviderBase(IQueryProvider inner) - : base(inner) - { - } - - protected IAsyncQueryProvider AsyncQueryProvider - { - get - { - if (Inner is IAsyncQueryProvider asyncProvider) return asyncProvider; - - throw new InvalidOperationException("The source IQueryProvider doesn't implement IAsyncQueryProvider."); - } - } - - // ReSharper disable once UnusedMember.Global - // ReSharper disable once VirtualMemberNeverOverridden.Global - public virtual TResult ExecuteAsync(Expression expression, CancellationToken cancellationToken) - { - var decompiled = expression.Decompile(); - return (TResult)MethodCache.ExecuteAsync(AsyncQueryProvider, decompiled, cancellationToken); - } - - protected static class MethodCache - { - static readonly Func ExecuteAsync1 = - (Func)CompileDelegate(OpenGenericExecuteAsync1?.MakeGenericMethod(typeof(T))); - - static readonly Func ExecuteAsync2 = - (Func)CompileDelegate(OpenGenericExecuteAsync2?.MakeGenericMethod(typeof(T))); - - public static object ExecuteAsync(IAsyncQueryProvider asyncQueryProvider, Expression expression) - { - return ExecuteAsync1(asyncQueryProvider, expression); - } - - public static object ExecuteAsync(IAsyncQueryProvider asyncQueryProvider, Expression expression, CancellationToken cancellationToken) - { - return ExecuteAsync2(asyncQueryProvider, expression, cancellationToken); - } - - static Delegate CompileDelegate(MethodInfo method) - { - if (method == null) - { - return null; - } - - var instance = method.DeclaringType != null && !method.IsStatic - ? Expression.Parameter(method.DeclaringType) - : null; - - var parameters = Array.ConvertAll(method.GetParameters(), - pi => Expression.Parameter(pi.ParameterType)); - - return Expression.Lambda( - Expression.Call( - instance, - method, - parameters), - new[] { instance }.Concat(parameters)) - .Compile(); - } - } - } - - class AsyncDecompiledQueryProvider : AsyncDecompiledQueryProviderBase, IAsyncQueryProvider - { - public AsyncDecompiledQueryProvider(IQueryProvider inner) - : base(inner) - { - } - - public override IQueryable CreateQuery(Expression expression) - { - var decompiled = expression.Decompile(); - return new EntityQueryable(this, decompiled); - } - - public virtual IAsyncEnumerable ExecuteAsync(Expression expression) - { - var decompiled = expression.Decompile(); - return (IAsyncEnumerable)MethodCache.ExecuteAsync(AsyncQueryProvider, decompiled); - } - - public new virtual Task ExecuteAsync(Expression expression, CancellationToken cancellationToken) - { - var decompiled = expression.Decompile(); - return (Task)MethodCache.ExecuteAsync(AsyncQueryProvider, decompiled, cancellationToken); - } - } -} diff --git a/src/DelegateDecompiler.EntityFrameworkCore/DecompileExtensions.cs b/src/DelegateDecompiler.EntityFrameworkCore/DecompileExtensions.cs deleted file mode 100644 index f98c8d92..00000000 --- a/src/DelegateDecompiler.EntityFrameworkCore/DecompileExtensions.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Linq; - -namespace DelegateDecompiler.EntityFrameworkCore -{ - public static class DecompileExtensions - { - public static IQueryable DecompileAsync(this IQueryable self) - { - return new AsyncDecompiledQueryProvider(self.Provider).CreateQuery(self.Expression); - } - } -} diff --git a/src/DelegateDecompiler.EntityFrameworkCore/DelegateDecompiler.EntityFrameworkCore.csproj b/src/DelegateDecompiler.EntityFrameworkCore/DelegateDecompiler.EntityFrameworkCore.csproj deleted file mode 100644 index 2c410cce..00000000 --- a/src/DelegateDecompiler.EntityFrameworkCore/DelegateDecompiler.EntityFrameworkCore.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - netstandard2.0 - Copyright © Alexander Zaytsev 2014 - 2021 - $(PackageTags) EF EntityFrameworkCore Entity-Framework-Core - true - - - - - - - - - - - diff --git a/src/DelegateDecompiler.EntityFrameworkCore/EntityTypeConfigurationExtensions.cs b/src/DelegateDecompiler.EntityFrameworkCore/EntityTypeConfigurationExtensions.cs deleted file mode 100644 index c2cf5635..00000000 --- a/src/DelegateDecompiler.EntityFrameworkCore/EntityTypeConfigurationExtensions.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Linq.Expressions; -using System.Reflection; -using Microsoft.EntityFrameworkCore.Metadata.Builders; - -namespace DelegateDecompiler.EntityFrameworkCore -{ - public static class EntityTypeConfigurationExtensions - { - public static EntityTypeBuilder Computed(this EntityTypeBuilder configuration, Expression> expression) where T : class - { - var memberInfo = ExtractMemberInfo(expression.Body); - - Configuration.Instance.RegisterDecompileableMember(memberInfo); - - return configuration; - } - - static MemberInfo ExtractMemberInfo(Expression body) - { - if (body.NodeType == ExpressionType.MemberAccess) - { - var member = ((MemberExpression)body).Member; - if (!(member is PropertyInfo)) - { - throw new InvalidOperationException("MemberExpression expected to have a Member of PropertyInfo type, but got " + member.GetType().Name); - } - return member; - } - if (body.NodeType == ExpressionType.Call) - { - return ((MethodCallExpression)body).Method; - } - throw new ArgumentException("Expression expected to be of MemberAccess or Call type, but got " + body.NodeType); - } - } -} diff --git a/src/DelegateDecompiler.EntityFrameworkCore3.Tests/DelegateDecompiler.EntityFrameworkCore3.Tests.csproj b/src/DelegateDecompiler.EntityFrameworkCore3.Tests/DelegateDecompiler.EntityFrameworkCore3.Tests.csproj deleted file mode 100644 index c2b3641f..00000000 --- a/src/DelegateDecompiler.EntityFrameworkCore3.Tests/DelegateDecompiler.EntityFrameworkCore3.Tests.csproj +++ /dev/null @@ -1,46 +0,0 @@ - - - net8.0 - Copyright © Dave Glick 2014, Jon Smith 2014, Alexander Zaytsev 2014 - 2021 - $(DefineConstants);EF_CORE;EF_CORE3 - DelegateDecompiler.EntityFramework.Tests - - - - - - %(Name) - - - - - - %(Name) - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/DelegateDecompiler.EntityFrameworkCore3.Tests/GeneratedDocumentation/DetailedListOfSupportedCommands.md b/src/DelegateDecompiler.EntityFrameworkCore3.Tests/GeneratedDocumentation/DetailedListOfSupportedCommands.md deleted file mode 100644 index 25b7ae97..00000000 --- a/src/DelegateDecompiler.EntityFrameworkCore3.Tests/GeneratedDocumentation/DetailedListOfSupportedCommands.md +++ /dev/null @@ -1,153 +0,0 @@ -Detail of supported commands -============ -## Documentation produced for DelegateDecompiler, version 0.33.0.0 on Thursday, 02 May 2024 21:08 - -This file documents what linq commands **DelegateDecompiler** supports when -working with [Entity Framework Core](https://docs.microsoft.com/en-us/ef/core/) (EF). -EF has one of the best implementations for converting Linq `IQueryable<>` commands into database -access commands, in EF's case T-SQL. Therefore it is a good candidate for using in our tests. - -This documentation was produced by compaired direct EF Linq queries against the same query implemented -as a DelegateDecompiler's `Computed` properties. This produces a Supported/Not Supported flag -on each command type tested. Tests are groups and ordered to try and make finding things -easier. - -So, if you want to use DelegateDecompiler and are not sure whether the linq command -you want to use will work then clone this project and write your own tests. -(See [How to add a test](HowToAddMoreTests.md) documentation on how to do this). -If there is a problem then please fork the repository and add your own tests. -That will make it much easier to diagnose your issue. - -*Note: The test suite has only recently been set up and has only a handful of tests at the moment. -More will appear as we move forward.* - - -### Group: Basic Features -#### [Select](../TestGroup05BasicFeatures/Test01Select.cs): -- Supported - * Bool Equals Constant (line 34) - * Bool Equals Static Variable (line 53) - * Int Equals Constant (line 70) - * Select Property Without Computed Attribute (line 87) - * Select Method Without Computed Attribute (line 104) - * Select Abstract Member Over Tph Hierarchy (line 121) - * Select Abstract Member Over Tph Hierarchy After Restricting To Subtype (line 138) - * Select Abstract Member Over Tph Hierarchy With Generic Classes After Restricting To Subtype (line 156) - * Select Abstract Member With Condition On It Over Tph Hierarchy With Generic Classes After Restricting To Subtype (line 181) - * Select Multiple Levels Of Abstract Members Over Tph Hierarchy (line 199) - -#### [Select Async](../TestGroup05BasicFeatures/Test02SelectAsync.cs): -- Supported - * Async (line 39) - * Bool Equals Constant Async (line 75) - * Decompile Upfront Bool Equals Constant Async (line 92) - * Bool Equals Static Variable To Array Async (line 111) - * Int Equals Constant (line 128) - -#### [Equals And Not Equals](../TestGroup05BasicFeatures/Test03EqualsAndNotEquals.cs): -- Supported - * Int Equals Constant (line 32) - * Int Equals Static Variable (line 50) - * Int Equals String Length (line 67) - * Int Not Equals String Length (line 84) - -#### [Nullable](../TestGroup05BasicFeatures/Test04Nullable.cs): -- Supported - * Property Is Null (line 35) - * Bool Equals Static Variable (line 54) - * Int Equals Constant (line 71) - * Nullable Init (line 88) - * Nullable Add (line 105) - -#### [Where](../TestGroup05BasicFeatures/Test05Where.cs): -- Supported - * Where Bool Equals Constant (line 33) - * Where Bool Equals Static Variable (line 52) - * Where Int Equals Constant (line 69) - * Where Filters On Abstract Members Over Tph Hierarchy (line 86) - -#### [Single](../TestGroup05BasicFeatures/Test10Single.cs): -- Supported - * Single Int Equals Unique Value (line 40) - -#### [Single Async](../TestGroup05BasicFeatures/Test11SingleAsync.cs): -- Supported - * Single Int Equals Unique Value Async (line 46) - - -### Group: Order Take -#### [Order By](../TestGroup10OrderTake/Test01OrderBy.cs): -- Supported - * Order By Children Count (line 33) - * Order By Children Count Then By String Length (line 51) - * Where Any Children Then Order By Children Count (line 69) - -#### [Skip Take](../TestGroup10OrderTake/Test02SkipTake.cs): -- Supported - * Order By Children Count Then Take (line 33) - * Order By Children Count Then Skip And Take (line 51) - * Where Any Children Then Order By Then Skip Take (line 69) - - -### Group: Quantifier Operators -#### [Any](../TestGroup12QuantifierOperators/Test01Any.cs): -- Supported - * Any Children (line 32) - * Any Children With Filter (line 49) - -#### [All](../TestGroup12QuantifierOperators/Test02All.cs): -- Supported - * Singleton All Filter (line 32) - * All Filter On Children Int (line 49) - -#### [Contains](../TestGroup12QuantifierOperators/Test03Contains.cs): -- Supported - * String Contains Constant String With Filter (line 33) - - -### Group: Aggregation -#### [Count](../TestGroup15Aggregation/Test01Count.cs): -- Supported - * Count Children (line 33) - * Count Children With Filter (line 51) - * Count Children With Filter By Closure (line 69) - * Count Children With Filter By External Closure (line 88) - * Count Children With Filter By External Closure2 (line 108) - * Singleton Count Children With Filter (line 126) - -#### [Sum](../TestGroup15Aggregation/Test02Sum.cs): -- Supported - * Sum Count In Children Where Children Can Be None (line 53) - -#### [Count Async](../TestGroup15Aggregation/Test03CountAsync.cs): -- Supported - * Count Children Async (line 40) - * Count Children With Filter Async (line 58) - * Count Children With Filter By Closure Async (line 76) - * Count Children With Filter By External Closure Async (line 95) - * Count Children With Filter By External Closure2 Async (line 115) - * Singleton Count Children With Filter Async (line 133) - - -### Group: Types -#### [Strings](../TestGroup50Types/Test01Strings.cs): -- Supported - * Concatenate Person Not Handle Null (line 32) - * Concatenate Person Handle Null (line 49) - * Concatenate Person Handle Name Order (line 68) - * Select Generic Method Person Handle (line 85) - * Filter Generic Method Person Handle (line 99) - -#### [DateTime](../TestGroup50Types/Test05DateTime.cs): -- Supported - * DateTime Where Compare With Static Variable (line 35) - - -### Group: Additional Features -#### [Nested Expressions](../TestGroup90AdditionalFeatures/Test01NestedExpressions.cs): -- Supported - * Subquery As Context Extension Method (line 68) - - - -The End diff --git a/src/DelegateDecompiler.EntityFrameworkCore3.Tests/GeneratedDocumentation/DetailedListOfSupportedCommandsWithSQL.md b/src/DelegateDecompiler.EntityFrameworkCore3.Tests/GeneratedDocumentation/DetailedListOfSupportedCommandsWithSQL.md deleted file mode 100644 index 589c4196..00000000 --- a/src/DelegateDecompiler.EntityFrameworkCore3.Tests/GeneratedDocumentation/DetailedListOfSupportedCommandsWithSQL.md +++ /dev/null @@ -1,519 +0,0 @@ -Detail With Sql of supported commands -============ -## Documentation produced for DelegateDecompiler, version 0.33.0.0 on Thursday, 02 May 2024 21:08 - -This file documents what linq commands **DelegateDecompiler** supports when -working with [Entity Framework Core](https://docs.microsoft.com/en-us/ef/core/) (EF). -EF has one of the best implementations for converting Linq `IQueryable<>` commands into database -access commands, in EF's case T-SQL. Therefore it is a good candidate for using in our tests. - -This documentation was produced by compaired direct EF Linq queries against the same query implemented -as a DelegateDecompiler's `Computed` properties. This produces a Supported/Not Supported flag -on each command type tested. Tests are groups and ordered to try and make finding things -easier. - -So, if you want to use DelegateDecompiler and are not sure whether the linq command -you want to use will work then clone this project and write your own tests. -(See [How to add a test](HowToAddMoreTests.md) documentation on how to do this). -If there is a problem then please fork the repository and add your own tests. -That will make it much easier to diagnose your issue. - -*Note: The test suite has only recently been set up and has only a handful of tests at the moment. -More will appear as we move forward.* - - -### Group: Basic Features -#### [Select](../TestGroup05BasicFeatures/Test01Select.cs): -- Supported - * Bool Equals Constant (line 34) - * T-Sql executed is - -```SQL - -``` - - * Bool Equals Static Variable (line 53) - * T-Sql executed is - -```SQL - -``` - - * Int Equals Constant (line 70) - * T-Sql executed is - -```SQL - -``` - - * Select Property Without Computed Attribute (line 87) - * T-Sql executed is - -```SQL - -``` - - * Select Method Without Computed Attribute (line 104) - * T-Sql executed is - -```SQL - -``` - - * Select Abstract Member Over Tph Hierarchy (line 121) - * T-Sql executed is - -```SQL - -``` - - * Select Abstract Member Over Tph Hierarchy After Restricting To Subtype (line 138) - * T-Sql executed is - -```SQL - -``` - - * Select Abstract Member Over Tph Hierarchy With Generic Classes After Restricting To Subtype (line 156) - * T-Sql executed is - -```SQL - -``` - - * Select Abstract Member With Condition On It Over Tph Hierarchy With Generic Classes After Restricting To Subtype (line 181) - * T-Sql executed is - -```SQL - -``` - - * Select Multiple Levels Of Abstract Members Over Tph Hierarchy (line 199) - * T-Sql executed is - -```SQL - -``` - - -#### [Select Async](../TestGroup05BasicFeatures/Test02SelectAsync.cs): -- Supported - * Async (line 39) - * T-Sql executed is - -```SQL - -``` - - * Bool Equals Constant Async (line 75) - * T-Sql executed is - -```SQL - -``` - - * Decompile Upfront Bool Equals Constant Async (line 92) - * T-Sql executed is - -```SQL - -``` - - * Bool Equals Static Variable To Array Async (line 111) - * T-Sql executed is - -```SQL - -``` - - * Int Equals Constant (line 128) - * T-Sql executed is - -```SQL - -``` - - -#### [Equals And Not Equals](../TestGroup05BasicFeatures/Test03EqualsAndNotEquals.cs): -- Supported - * Int Equals Constant (line 32) - * T-Sql executed is - -```SQL - -``` - - * Int Equals Static Variable (line 50) - * T-Sql executed is - -```SQL - -``` - - * Int Equals String Length (line 67) - * T-Sql executed is - -```SQL - -``` - - * Int Not Equals String Length (line 84) - * T-Sql executed is - -```SQL - -``` - - -#### [Nullable](../TestGroup05BasicFeatures/Test04Nullable.cs): -- Supported - * Property Is Null (line 35) - * T-Sql executed is - -```SQL - -``` - - * Bool Equals Static Variable (line 54) - * T-Sql executed is - -```SQL - -``` - - * Int Equals Constant (line 71) - * T-Sql executed is - -```SQL - -``` - - * Nullable Init (line 88) - * T-Sql executed is - -```SQL - -``` - - * Nullable Add (line 105) - * T-Sql executed is - -```SQL - -``` - - -#### [Where](../TestGroup05BasicFeatures/Test05Where.cs): -- Supported - * Where Bool Equals Constant (line 33) - * T-Sql executed is - -```SQL - -``` - - * Where Bool Equals Static Variable (line 52) - * T-Sql executed is - -```SQL - -``` - - * Where Int Equals Constant (line 69) - * T-Sql executed is - -```SQL - -``` - - * Where Filters On Abstract Members Over Tph Hierarchy (line 86) - * T-Sql executed is - -```SQL - -``` - - -#### [Single](../TestGroup05BasicFeatures/Test10Single.cs): -- Supported - * Single Int Equals Unique Value (line 40) - * T-Sql executed is - -```SQL - -``` - - -#### [Single Async](../TestGroup05BasicFeatures/Test11SingleAsync.cs): -- Supported - * Single Int Equals Unique Value Async (line 46) - * T-Sql executed is - -```SQL - -``` - - - -### Group: Order Take -#### [Order By](../TestGroup10OrderTake/Test01OrderBy.cs): -- Supported - * Order By Children Count (line 33) - * T-Sql executed is - -```SQL - -``` - - * Order By Children Count Then By String Length (line 51) - * T-Sql executed is - -```SQL - -``` - - * Where Any Children Then Order By Children Count (line 69) - * T-Sql executed is - -```SQL - -``` - - -#### [Skip Take](../TestGroup10OrderTake/Test02SkipTake.cs): -- Supported - * Order By Children Count Then Take (line 33) - * T-Sql executed is - -```SQL - -``` - - * Order By Children Count Then Skip And Take (line 51) - * T-Sql executed is - -```SQL - -``` - - * Where Any Children Then Order By Then Skip Take (line 69) - * T-Sql executed is - -```SQL - -``` - - - -### Group: Quantifier Operators -#### [Any](../TestGroup12QuantifierOperators/Test01Any.cs): -- Supported - * Any Children (line 32) - * T-Sql executed is - -```SQL - -``` - - * Any Children With Filter (line 49) - * T-Sql executed is - -```SQL - -``` - - -#### [All](../TestGroup12QuantifierOperators/Test02All.cs): -- Supported - * Singleton All Filter (line 32) - * T-Sql executed is - -```SQL - -``` - - * All Filter On Children Int (line 49) - * T-Sql executed is - -```SQL - -``` - - -#### [Contains](../TestGroup12QuantifierOperators/Test03Contains.cs): -- Supported - * String Contains Constant String With Filter (line 33) - * T-Sql executed is - -```SQL - -``` - - - -### Group: Aggregation -#### [Count](../TestGroup15Aggregation/Test01Count.cs): -- Supported - * Count Children (line 33) - * T-Sql executed is - -```SQL - -``` - - * Count Children With Filter (line 51) - * T-Sql executed is - -```SQL - -``` - - * Count Children With Filter By Closure (line 69) - * T-Sql executed is - -```SQL - -``` - - * Count Children With Filter By External Closure (line 88) - * T-Sql executed is - -```SQL - -``` - - * Count Children With Filter By External Closure2 (line 108) - * T-Sql executed is - -```SQL - -``` - - * Singleton Count Children With Filter (line 126) - * T-Sql executed is - -```SQL - -``` - - -#### [Sum](../TestGroup15Aggregation/Test02Sum.cs): -- Supported - * Sum Count In Children Where Children Can Be None (line 53) - * T-Sql executed is - -```SQL - -``` - - -#### [Count Async](../TestGroup15Aggregation/Test03CountAsync.cs): -- Supported - * Count Children Async (line 40) - * T-Sql executed is - -```SQL - -``` - - * Count Children With Filter Async (line 58) - * T-Sql executed is - -```SQL - -``` - - * Count Children With Filter By Closure Async (line 76) - * T-Sql executed is - -```SQL - -``` - - * Count Children With Filter By External Closure Async (line 95) - * T-Sql executed is - -```SQL - -``` - - * Count Children With Filter By External Closure2 Async (line 115) - * T-Sql executed is - -```SQL - -``` - - * Singleton Count Children With Filter Async (line 133) - * T-Sql executed is - -```SQL - -``` - - - -### Group: Types -#### [Strings](../TestGroup50Types/Test01Strings.cs): -- Supported - * Concatenate Person Not Handle Null (line 32) - * T-Sql executed is - -```SQL - -``` - - * Concatenate Person Handle Null (line 49) - * T-Sql executed is - -```SQL - -``` - - * Concatenate Person Handle Name Order (line 68) - * T-Sql executed is - -```SQL - -``` - - * Select Generic Method Person Handle (line 85) - * T-Sql executed is - -```SQL - -``` - - * Filter Generic Method Person Handle (line 99) - * T-Sql executed is - -```SQL - -``` - - -#### [DateTime](../TestGroup50Types/Test05DateTime.cs): -- Supported - * DateTime Where Compare With Static Variable (line 35) - * T-Sql executed is - -```SQL - -``` - - - -### Group: Additional Features -#### [Nested Expressions](../TestGroup90AdditionalFeatures/Test01NestedExpressions.cs): -- Supported - * Subquery As Context Extension Method (line 68) - * T-Sql executed is - -```SQL - -``` - - - - -The End diff --git a/src/DelegateDecompiler.EntityFrameworkCore3.Tests/GeneratedDocumentation/DocumentationHeaderText.md b/src/DelegateDecompiler.EntityFrameworkCore3.Tests/GeneratedDocumentation/DocumentationHeaderText.md deleted file mode 100644 index 3a89a85d..00000000 --- a/src/DelegateDecompiler.EntityFrameworkCore3.Tests/GeneratedDocumentation/DocumentationHeaderText.md +++ /dev/null @@ -1,20 +0,0 @@ - -This file documents what linq commands **DelegateDecompiler** supports when -working with [Entity Framework Core](https://docs.microsoft.com/en-us/ef/core/) (EF). -EF has one of the best implementations for converting Linq `IQueryable<>` commands into database -access commands, in EF's case T-SQL. Therefore it is a good candidate for using in our tests. - -This documentation was produced by compaired direct EF Linq queries against the same query implemented -as a DelegateDecompiler's `Computed` properties. This produces a Supported/Not Supported flag -on each command type tested. Tests are groups and ordered to try and make finding things -easier. - -So, if you want to use DelegateDecompiler and are not sure whether the linq command -you want to use will work then clone this project and write your own tests. -(See [How to add a test](HowToAddMoreTests.md) documentation on how to do this). -If there is a problem then please fork the repository and add your own tests. -That will make it much easier to diagnose your issue. - -*Note: The test suite has only recently been set up and has only a handful of tests at the moment. -More will appear as we move forward.* - diff --git a/src/DelegateDecompiler.EntityFrameworkCore3.Tests/GeneratedDocumentation/SummaryOfSupportedCommands.md b/src/DelegateDecompiler.EntityFrameworkCore3.Tests/GeneratedDocumentation/SummaryOfSupportedCommands.md deleted file mode 100644 index 56ec9cc0..00000000 --- a/src/DelegateDecompiler.EntityFrameworkCore3.Tests/GeneratedDocumentation/SummaryOfSupportedCommands.md +++ /dev/null @@ -1,62 +0,0 @@ -Summary of supported commands -============ -## Documentation produced for DelegateDecompiler, version 0.33.0.0 on Thursday, 02 May 2024 21:08 - -This file documents what linq commands **DelegateDecompiler** supports when -working with [Entity Framework Core](https://docs.microsoft.com/en-us/ef/core/) (EF). -EF has one of the best implementations for converting Linq `IQueryable<>` commands into database -access commands, in EF's case T-SQL. Therefore it is a good candidate for using in our tests. - -This documentation was produced by compaired direct EF Linq queries against the same query implemented -as a DelegateDecompiler's `Computed` properties. This produces a Supported/Not Supported flag -on each command type tested. Tests are groups and ordered to try and make finding things -easier. - -So, if you want to use DelegateDecompiler and are not sure whether the linq command -you want to use will work then clone this project and write your own tests. -(See [How to add a test](HowToAddMoreTests.md) documentation on how to do this). -If there is a problem then please fork the repository and add your own tests. -That will make it much easier to diagnose your issue. - -*Note: The test suite has only recently been set up and has only a handful of tests at the moment. -More will appear as we move forward.* - - -### Group: Basic Features -- Supported - * [Select](../TestGroup05BasicFeatures/Test01Select.cs) (10 tests) - * [Select Async](../TestGroup05BasicFeatures/Test02SelectAsync.cs) (5 tests) - * [Equals And Not Equals](../TestGroup05BasicFeatures/Test03EqualsAndNotEquals.cs) (4 tests) - * [Nullable](../TestGroup05BasicFeatures/Test04Nullable.cs) (5 tests) - * [Where](../TestGroup05BasicFeatures/Test05Where.cs) (4 tests) - * [Single](../TestGroup05BasicFeatures/Test10Single.cs) (1 tests) - * [Single Async](../TestGroup05BasicFeatures/Test11SingleAsync.cs) (1 tests) - -### Group: Order Take -- Supported - * [Order By](../TestGroup10OrderTake/Test01OrderBy.cs) (3 tests) - * [Skip Take](../TestGroup10OrderTake/Test02SkipTake.cs) (3 tests) - -### Group: Quantifier Operators -- Supported - * [Any](../TestGroup12QuantifierOperators/Test01Any.cs) (2 tests) - * [All](../TestGroup12QuantifierOperators/Test02All.cs) (2 tests) - * [Contains](../TestGroup12QuantifierOperators/Test03Contains.cs) (1 tests) - -### Group: Aggregation -- Supported - * [Count](../TestGroup15Aggregation/Test01Count.cs) (6 tests) - * [Sum](../TestGroup15Aggregation/Test02Sum.cs) (1 tests) - * [Count Async](../TestGroup15Aggregation/Test03CountAsync.cs) (6 tests) - -### Group: Types -- Supported - * [Strings](../TestGroup50Types/Test01Strings.cs) (5 tests) - * [DateTime](../TestGroup50Types/Test05DateTime.cs) (1 tests) - -### Group: Additional Features -- Supported - * [Nested Expressions](../TestGroup90AdditionalFeatures/Test01NestedExpressions.cs) (1 tests) - - -The End diff --git a/src/DelegateDecompiler.EntityFrameworkCore3.Tests/GeneratedDocumentation/Test file - please ignore.txt b/src/DelegateDecompiler.EntityFrameworkCore3.Tests/GeneratedDocumentation/Test file - please ignore.txt deleted file mode 100644 index 875c32fa..00000000 --- a/src/DelegateDecompiler.EntityFrameworkCore3.Tests/GeneratedDocumentation/Test file - please ignore.txt +++ /dev/null @@ -1 +0,0 @@ -This is a Unit Test of the MarkupFileHelpers \ No newline at end of file diff --git a/src/DelegateDecompiler/AssemblyInfo.cs b/src/DelegateDecompiler/AssemblyInfo.cs index 9f185e72..fcd222fa 100644 --- a/src/DelegateDecompiler/AssemblyInfo.cs +++ b/src/DelegateDecompiler/AssemblyInfo.cs @@ -2,5 +2,4 @@ [assembly: InternalsVisibleTo("DelegateDecompiler.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c96a47f445d38b9b23cbf52e405743481cb9bd2df4672ad6494abcdeb9daf5588eb6159cc88af5fd5a18cece1f05ecb3ddba4b6329535438f4d173f2b769c4715c136ce65c2f25e7360916737056bca40bee22ab2f178af4c5fdc0e5051a6b2630f31447885eb4f5273271c56bd7b8fb240ab453635a79ec2d8aae4a58a6439f")] [assembly: InternalsVisibleTo("DelegateDecompiler.EntityFramework, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c96a47f445d38b9b23cbf52e405743481cb9bd2df4672ad6494abcdeb9daf5588eb6159cc88af5fd5a18cece1f05ecb3ddba4b6329535438f4d173f2b769c4715c136ce65c2f25e7360916737056bca40bee22ab2f178af4c5fdc0e5051a6b2630f31447885eb4f5273271c56bd7b8fb240ab453635a79ec2d8aae4a58a6439f")] -[assembly: InternalsVisibleTo("DelegateDecompiler.EntityFrameworkCore, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c96a47f445d38b9b23cbf52e405743481cb9bd2df4672ad6494abcdeb9daf5588eb6159cc88af5fd5a18cece1f05ecb3ddba4b6329535438f4d173f2b769c4715c136ce65c2f25e7360916737056bca40bee22ab2f178af4c5fdc0e5051a6b2630f31447885eb4f5273271c56bd7b8fb240ab453635a79ec2d8aae4a58a6439f")] [assembly: InternalsVisibleTo("DelegateDecompiler.EntityFrameworkCore5, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c96a47f445d38b9b23cbf52e405743481cb9bd2df4672ad6494abcdeb9daf5588eb6159cc88af5fd5a18cece1f05ecb3ddba4b6329535438f4d173f2b769c4715c136ce65c2f25e7360916737056bca40bee22ab2f178af4c5fdc0e5051a6b2630f31447885eb4f5273271c56bd7b8fb240ab453635a79ec2d8aae4a58a6439f")] diff --git a/test.cmd b/test.cmd index a0e5fc9a..b45a23d4 100644 --- a/test.cmd +++ b/test.cmd @@ -9,7 +9,5 @@ nunit3-console ^ dotnet test --no-build -c Release -f net8.0 src\DelegateDecompiler.Tests && ^ dotnet test --no-build -c Release -f net8.0 src\DelegateDecompiler.Tests.VB && ^ dotnet test --no-build -c Release -f net8.0 src\DelegateDecompiler.EntityFramework.Tests && ^ -dotnet test --no-build -c Release -f net8.0 src\DelegateDecompiler.EntityFrameworkCore.Tests && ^ -dotnet test --no-build -c Release -f net8.0 src\DelegateDecompiler.EntityFrameworkCore3.Tests && ^ dotnet test --no-build -c Release -f net8.0 src\DelegateDecompiler.EntityFrameworkCore6.Tests dotnet test --no-build -c Release -f net8.0 src\DelegateDecompiler.EntityFrameworkCore8.Tests