diff --git a/README.md b/README.md
index fa39b8e3..590fd0e3 100644
--- a/README.md
+++ b/README.md
@@ -1,19 +1,6 @@
# System.Linq.Dynamic.Core
This is a **.NET Core / Standard port** of the Microsoft assembly for the .Net 4.0 Dynamic language functionality.
-[](https://ci.appveyor.com/project/StefH/system-linq-dynamic-core)
-[](https://codecov.io/gh/StefH/System.Linq.Dynamic.Core)
-[](https://coveralls.io/github/StefH/System.Linq.Dynamic.Core?branch=master)
-[](https://github.com/StefH/System.Linq.Dynamic.Core/issues)
-[](https://github.com/StefH/System.Linq.Dynamic.Core/stargazers)
-[](https://raw.githubusercontent.com/StefH/System.Linq.Dynamic.Core/master/LICENSE)
-
-| Project | NuGet |
-| ------- | ----- |
-| System.Linq.Dynamic.Core | [](https://www.nuget.org/packages/System.Linq.Dynamic.Core) |
-| EntityFramework.DynamicLinq | [](https://www.nuget.org/packages/EntityFramework.DynamicLinq) |
-| Microsoft.EntityFrameworkCore.DynamicLinq | [](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.DynamicLinq) |
-
# Overview
With this library it's possible to write Dynamic LINQ queries (string based) on an `IQueryable`:
```csharp
@@ -25,11 +12,32 @@ var query = db.Customers
# How to use
There are several documentation resources:
-
- [Wiki][doc-wiki] : an overview from the basic functionality (correctness ~ 80%)
- [API Documentation][doc-api] : a low-level API description website with some code samples
- DynamicLinqWebDocs (TODO)
+# Info
+| | |
+| --- | --- |
+| ***Project*** | |
+| **Chat** | [](https://gitter.im/system-linq-dynamic-core/Lobby) |
+| **Issues** | [](https://github.com/StefH/System.Linq.Dynamic.Core/issues) |
+| | |
+| ***Quality*** | |
+| **Build** | [](https://ci.appveyor.com/project/StefH/system-linq-dynamic-core) |
+| **CodeFactor** | [](https://www.codefactor.io/repository/github/stefh/system.linq.dynamic.core)
+| **Sonar Quality Gate** | [](https://sonarcloud.io/project/issues?id=system.linq.dynamic.core) |
+| **Sonar Bugs** | [](https://sonarcloud.io/project/issues?id=system.linq.dynamic.core&resolved=false&types=BUG) |
+| **Sonar Code Smells** | [](https://sonarcloud.io/project/issues?id=system.linq.dynamic.core&resolved=false&types=CODE_SMELL) |
+| **Sonar Coverage** | [](https://sonarcloud.io/component_measures?id=system.linq.dynamic.core&metric=coverage) |
+| **Codecov** | [](https://codecov.io/gh/StefH/System.Linq.Dynamic.Core) |
+| **Coveralls** | [](https://coveralls.io/github/StefH/System.Linq.Dynamic.Core?branch=master) |
+| |
+| ***Nuget*** | |
+| **System.Linq.Dynamic.Core** | [](https://www.nuget.org/packages/System.Linq.Dynamic.Core) |
+| **EntityFramework.DynamicLinq** | [](https://www.nuget.org/packages/EntityFramework.DynamicLinq) |
+| **Microsoft.EntityFrameworkCore.DynamicLinq** | [](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.DynamicLinq) |
+
# Development Details
diff --git a/appveyor.yml b/appveyor.yml
index ce297b0a..b21afa23 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -10,20 +10,24 @@ platform: Any CPU
init:
- ps: $Env:LABEL = "CI" + $Env:APPVEYOR_BUILD_NUMBER.PadLeft(5, "0")
+# install dotnet SDK and dotnet-sonarscanner
install:
- - ps: Start-FileDownload 'https://download.microsoft.com/download/D/7/2/D725E47F-A4F1-4285-8935-A91AE2FCC06A/dotnet-sdk-2.0.3-win-gs-x64.exe'
- - cmd: dotnet-sdk-2.0.3-win-gs-x64.exe /quiet
- - ps: $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = "true"
+- ps: Start-FileDownload 'https://download.microsoft.com/download/4/0/9/40920432-3302-47a8-b13c-bbc4848ad114/dotnet-sdk-2.1.302-win-x64.exe'
+- cmd: dotnet-sdk-2.1.302-win-x64.exe /quiet
+- ps: $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = "true"
+- dotnet tool install --global dotnet-sonarscanner
environment:
PATH: $(PATH);$(PROGRAMFILES)\dotnet\
COVERALLS_REPO_TOKEN:
secure: tsTABRbCmdWFLT194XNIrpurerOfjN6cEoxt2RaSUfLmUIgra/+CwuqVkv0sPRop
+ SONAR_TOKEN:
+ secure: guog1+ttdnlD8sVgvizlewksm3qbO7dy2oZUcR8WhurWYvdOByinxXo732hmSaMT
-build_script:
+before_build:
# Remove UAP10 and netstandard20 from csproj
-- cmd: copy /Y src\System.Linq.Dynamic.Core\System.Linq.Dynamic.Core.AppVeyor.csproj src\System.Linq.Dynamic.Core\System.Linq.Dynamic.Core.csproj
-- cmd: copy /Y src\Microsoft.EntityFrameworkCore.DynamicLinq\Microsoft.EntityFrameworkCore.DynamicLinq.AppVeyor.csproj src\Microsoft.EntityFrameworkCore.DynamicLinq\Microsoft.EntityFrameworkCore.DynamicLinq.csproj
+#- cmd: copy /Y src\System.Linq.Dynamic.Core\System.Linq.Dynamic.Core.AppVeyor.csproj src\System.Linq.Dynamic.Core\System.Linq.Dynamic.Core.csproj
+#- cmd: copy /Y src\Microsoft.EntityFrameworkCore.DynamicLinq\Microsoft.EntityFrameworkCore.DynamicLinq.AppVeyor.csproj src\Microsoft.EntityFrameworkCore.DynamicLinq\Microsoft.EntityFrameworkCore.DynamicLinq.csproj
# Restore all
- dotnet restore src\System.Linq.Dynamic.Core\System.Linq.Dynamic.Core.csproj
@@ -33,10 +37,13 @@ build_script:
- dotnet restore test\System.Linq.Dynamic.Core.Tests\System.Linq.Dynamic.Core.Tests.csproj
- dotnet restore test\EntityFramework.DynamicLinq.Tests\EntityFramework.DynamicLinq.Tests.csproj
+build_script:
+# Begin SonarScanner
+- dotnet sonarscanner begin /k:"system.linq.dynamic.core" /d:sonar.organization="stefh-github" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="%SONAR_TOKEN%" /v:"%APPVEYOR_BUILD_NUMBER%" /d:sonar.cs.opencover.reportsPaths="%CD%\coverage.xml"
+
# Build Code
-#- dotnet build src\EntityFramework.DynamicLinq\EntityFramework.DynamicLinq.csproj -c %CONFIGURATION%
-#- dotnet build src\System.Linq.Dynamic.Core\System.Linq.Dynamic.Core.csproj -c %CONFIGURATION% --framework netstandard1.3
-#- dotnet build src\Microsoft.EntityFrameworkCore.DynamicLinq\Microsoft.EntityFrameworkCore.DynamicLinq.csproj -c %CONFIGURATION% --framework netstandard1.3
+- dotnet build src\EntityFramework.DynamicLinq\EntityFramework.DynamicLinq.csproj -c %CONFIGURATION%
+- dotnet build src\Microsoft.EntityFrameworkCore.DynamicLinq\Microsoft.EntityFrameworkCore.DynamicLinq.csproj -c %CONFIGURATION% --framework netstandard2.0
- dotnet build src\System.Linq.Dynamic.Core\System.Linq.Dynamic.Core.csproj -c %CONFIGURATION% --framework netstandard2.0
# Build Tests
@@ -44,15 +51,15 @@ build_script:
- dotnet build test\EntityFramework.DynamicLinq.Tests\EntityFramework.DynamicLinq.Tests.csproj -c %CONFIGURATION%
test_script:
-# Run tests for EntityFramework.DynamicLinq
-- dotnet test -c %CONFIGURATION% --no-build test\EntityFramework.DynamicLinq.Tests\EntityFramework.DynamicLinq.Tests.csproj
-
-after_test:
# Use System.Linq.Dynamic.Core.Tests as coverage tests
- - nuget.exe install OpenCover -ExcludeVersion
- - nuget.exe install coveralls.net -ExcludeVersion -Version 0.7.0
- - pip install codecov
+- nuget.exe install OpenCover -ExcludeVersion
+- nuget.exe install coveralls.net -ExcludeVersion -Version 0.7.0
+- pip install codecov
+
+- cmd: '"OpenCover\tools\OpenCover.Console.exe" -target:dotnet.exe -targetargs:"test test\System.Linq.Dynamic.Core.Tests\System.Linq.Dynamic.Core.Tests.csproj --configuration %CONFIGURATION% --framework netcoreapp1.1 --no-build" -output:coverage.xml -register:user -filter:"+[Microsoft.EntityFrameworkCore.DynamicLinq]* +[System.Linq.Dynamic.Core]* -[*Tests*]*" -nodefaultfilters -returntargetcode -oldstyle'
+- codecov -f "coverage.xml"
+- coveralls.net\tools\csmacnz.Coveralls.exe --opencover -i .\coverage.xml
+- dotnet sonarscanner end /d:sonar.login="%SONAR_TOKEN%"
- - cmd: '"OpenCover\tools\OpenCover.Console.exe" -target:dotnet.exe -targetargs:"test test\System.Linq.Dynamic.Core.Tests\System.Linq.Dynamic.Core.Tests.csproj --configuration %CONFIGURATION% --framework netcoreapp1.1 --no-build" -output:coverage.xml -register:user -filter:"+[Microsoft.EntityFrameworkCore.DynamicLinq]* +[System.Linq.Dynamic.Core]* -[*Tests*]*" -nodefaultfilters -returntargetcode -oldstyle'
- - codecov -f "coverage.xml"
- - coveralls.net\tools\csmacnz.Coveralls.exe --opencover -i .\coverage.xml
+# Run tests for EntityFramework.DynamicLinq
+- dotnet test -c %CONFIGURATION% --no-build test\EntityFramework.DynamicLinq.Tests\EntityFramework.DynamicLinq.Tests.csproj
diff --git a/codecov-local.cmd b/codecov-local.cmd
index 63fe807c..fedc7213 100644
--- a/codecov-local.cmd
+++ b/codecov-local.cmd
@@ -1,9 +1,7 @@
rem https://www.appveyor.com/blog/2017/03/17/codecov/
-rem C:\Users\Stef\.nuget\packages\opencover\4.6.519\tools\OpenCover.Console.exe -target:"C:\Users\Stef\.nuget\packages\xunit.runner.console\2.3.0-beta1-build3642\tools\xunit.console.x86.exe" -targetargs:"test\System.Linq.Dynamic.Core.Tests\bin\Debug\netcoreapp1.1\System.Linq.Dynamic.Core.Tests.dll -noshadow" -output:".\coverage.xml" -filter:+[System.Linq.Dynamic.Core]*'
-
-%USERPROFILE%\.nuget\packages\opencover\4.6.519\tools\OpenCover.Console.exe -target:dotnet.exe -targetargs:"test test\System.Linq.Dynamic.Core.Tests\System.Linq.Dynamic.Core.Tests.csproj --no-build" -filter:"+[Microsoft.EntityFrameworkCore.DynamicLinq]* +[System.Linq.Dynamic.Core]* -[*Tests*]* -[System.Linq.Dynamic.Core]System.Linq.Dynamic.Core.Validation.*" -nodefaultfilters -output:coverage.xml -register:user -oldStyle
+%USERPROFILE%\.nuget\packages\opencover\4.6.519\tools\OpenCover.Console.exe -target:dotnet.exe -targetargs:"test test\System.Linq.Dynamic.Core.Tests\System.Linq.Dynamic.Core.Tests.csproj --no-build --framework netcoreapp1.1" -filter:"+[EntityFramework.DynamicLinq]* +[Microsoft.EntityFrameworkCore.DynamicLinq]* +[System.Linq.Dynamic.Core]* -[*Tests*]* -[System.Linq.Dynamic.Core]System.Linq.Dynamic.Core.Validation.*" -nodefaultfilters -output:coverage.xml -register:user -oldStyle
%USERPROFILE%\.nuget\packages\ReportGenerator\2.5.6\tools\ReportGenerator.exe -reports:"coverage.xml" -targetdir:"report"
-start report\index.htm
\ No newline at end of file
+start report\index.htm
diff --git a/report/Microsoft.EntityFrameworkCore.DynamicLinq_Check.htm b/report/Microsoft.EntityFrameworkCore.DynamicLinq_Check.htm
index 5dfc0c14..132bf797 100644
--- a/report/Microsoft.EntityFrameworkCore.DynamicLinq_Check.htm
+++ b/report/Microsoft.EntityFrameworkCore.DynamicLinq_Check.htm
@@ -15,7 +15,7 @@
Summary
Class: System.Linq.Dynamic.Core.Validation.Check
Assembly: Microsoft.EntityFrameworkCore.DynamicLinq
-File(s): C:\Users\Stef\Documents\GitHub\System.Linq.Dynamic.Core\src\System.Linq.Dynamic.Core\Validation\Check.cs
+File(s): C:\Users\azureuser\Documents\Github\System.Linq.Dynamic.Core\src\System.Linq.Dynamic.Core\Validation\Check.cs
Covered lines: 11
Uncovered lines: 60
Coverable lines: 71
@@ -39,7 +39,7 @@ Metrics
File(s)
-
+C:\Users\azureuser\Documents\Github\System.Linq.Dynamic.Core\src\System.Linq.Dynamic.Core\Validation\Check.cs
# Line Line coverage
@@ -184,7 +184,7 @@
-
+
Methods/Properties
diff --git a/report/Microsoft.EntityFrameworkCore.DynamicLinq_DynamicFunctions.htm b/report/Microsoft.EntityFrameworkCore.DynamicLinq_DynamicFunctions.htm
new file mode 100644
index 00000000..22f0ede4
--- /dev/null
+++ b/report/Microsoft.EntityFrameworkCore.DynamicLinq_DynamicFunctions.htm
@@ -0,0 +1,30 @@
+
+
+
+
+
+
Microsoft.EntityFrameworkCore.DynamicLinq.DynamicFunctions - Coverage Report
+
+
+
Summary
+
+
+
+
+
+
+Class: Microsoft.EntityFrameworkCore.DynamicLinq.DynamicFunctions
+Assembly: Microsoft.EntityFrameworkCore.DynamicLinq
+File(s):
+Covered lines: 0
+Uncovered lines: 0
+Coverable lines: 0
+Total lines: 0
+Line coverage:
+
+
+
File(s)
+
No files found. This usually happens if a file isn't covered by a test or the class does not contain any sequence points (e.g. a class that only contains auto properties).
+
+
+
\ No newline at end of file
diff --git a/report/Microsoft.EntityFrameworkCore.DynamicLinq_EntityFrameworkDynamicQueryableExtensions.htm b/report/Microsoft.EntityFrameworkCore.DynamicLinq_EntityFrameworkDynamicQueryableExtensions.htm
index 307a02bc..7be90852 100644
--- a/report/Microsoft.EntityFrameworkCore.DynamicLinq_EntityFrameworkDynamicQueryableExtensions.htm
+++ b/report/Microsoft.EntityFrameworkCore.DynamicLinq_EntityFrameworkDynamicQueryableExtensions.htm
@@ -15,11 +15,11 @@
Summary
Class: Microsoft.EntityFrameworkCore.DynamicLinq.EntityFrameworkDynamicQueryableExtensions
Assembly: Microsoft.EntityFrameworkCore.DynamicLinq
-File(s): C:\Users\Stef\Documents\GitHub\System.Linq.Dynamic.Core\src\Microsoft.EntityFrameworkCore.DynamicLinq\EFDynamicQueryableExtensions.cs
+File(s): C:\Users\azureuser\Documents\Github\System.Linq.Dynamic.Core\src\Microsoft.EntityFrameworkCore.DynamicLinq\EFDynamicQueryableExtensions.cs
Covered lines: 96
Uncovered lines: 42
Coverable lines: 138
-Total lines: 639
+Total lines: 654
Line coverage: 69.5%
Branch coverage: 50%
@@ -55,7 +55,7 @@
Metrics
File(s)
-
+
C:\Users\azureuser\Documents\Github\System.Linq.Dynamic.Core\src\Microsoft.EntityFrameworkCore.DynamicLinq\EFDynamicQueryableExtensions.cs
# Line Line coverage
@@ -65,125 +65,125 @@
-
+
Methods/Properties
-
.cctor()
-
OptimizeExpression(System.Linq.Expressions.Expression)
-
AnyAsync(System.Linq.IQueryable,System.Threading.CancellationToken)
-
AnyAsync(System.Linq.IQueryable,System.String,System.Object[])
+
.cctor()
+
OptimizeExpression(System.Linq.Expressions.Expression)
+
AnyAsync(System.Linq.IQueryable,System.Threading.CancellationToken)
+
AnyAsync(System.Linq.IQueryable,System.String,System.Object[])
AnyAsync(System.Linq.IQueryable,System.String,System.Threading.CancellationToken,System.Object[])
-
CountAsync(System.Linq.IQueryable,System.Threading.CancellationToken)
-
CountAsync(System.Linq.IQueryable,System.String,System.Object[])
-
CountAsync(System.Linq.IQueryable,System.Threading.CancellationToken,System.String,System.Object[])
-
FirstAsync(System.Linq.IQueryable,System.Threading.CancellationToken)
-
FirstAsync(System.Linq.IQueryable,System.String,System.Object[])
-
FirstAsync(System.Linq.IQueryable,System.Threading.CancellationToken,System.String,System.Object[])
-
FirstOrDefaultAsync(System.Linq.IQueryable,System.Threading.CancellationToken)
-
FirstOrDefaultAsync(System.Linq.IQueryable,System.String,System.Object[])
-
FirstOrDefaultAsync(System.Linq.IQueryable,System.Threading.CancellationToken,System.String,System.Object[])
-
LastAsync(System.Linq.IQueryable,System.Threading.CancellationToken)
-
LastAsync(System.Linq.IQueryable,System.String,System.Object[])
-
LastAsync(System.Linq.IQueryable,System.Threading.CancellationToken,System.String,System.Object[])
-
LastOrDefaultAsync(System.Linq.IQueryable,System.Threading.CancellationToken)
-
LastOrDefaultAsync(System.Linq.IQueryable,System.String,System.Object[])
-
LastOrDefaultAsync(System.Linq.IQueryable,System.Threading.CancellationToken,System.String,System.Object[])
-
ExecuteAsync(System.Reflection.MethodInfo,System.Linq.IQueryable,System.Threading.CancellationToken)
-
ExecuteAsync(System.Reflection.MethodInfo,System.Linq.IQueryable,System.Linq.Expressions.LambdaExpression,System.Threading.CancellationToken)
-
ExecuteAsync(System.Reflection.MethodInfo,System.Linq.IQueryable,System.Linq.Expressions.Expression,System.Threading.CancellationToken)
-
GetMethod(System.String,System.Int32,System.Func`2<System.Reflection.MethodInfo,System.Boolean>)
-
GetMethod(System.String,System.Int32,System.Func`2<System.Reflection.MethodInfo,System.Boolean>)
+
CountAsync(System.Linq.IQueryable,System.Threading.CancellationToken)
+
CountAsync(System.Linq.IQueryable,System.String,System.Object[])
+
CountAsync(System.Linq.IQueryable,System.Threading.CancellationToken,System.String,System.Object[])
+
FirstAsync(System.Linq.IQueryable,System.Threading.CancellationToken)
+
FirstAsync(System.Linq.IQueryable,System.String,System.Object[])
+
FirstAsync(System.Linq.IQueryable,System.Threading.CancellationToken,System.String,System.Object[])
+
FirstOrDefaultAsync(System.Linq.IQueryable,System.Threading.CancellationToken)
+
FirstOrDefaultAsync(System.Linq.IQueryable,System.String,System.Object[])
+
FirstOrDefaultAsync(System.Linq.IQueryable,System.Threading.CancellationToken,System.String,System.Object[])
+
LastAsync(System.Linq.IQueryable,System.Threading.CancellationToken)
+
LastAsync(System.Linq.IQueryable,System.String,System.Object[])
+
LastAsync(System.Linq.IQueryable,System.Threading.CancellationToken,System.String,System.Object[])
+
LastOrDefaultAsync(System.Linq.IQueryable,System.Threading.CancellationToken)
+
LastOrDefaultAsync(System.Linq.IQueryable,System.String,System.Object[])
+
LastOrDefaultAsync(System.Linq.IQueryable,System.Threading.CancellationToken,System.String,System.Object[])
+
ExecuteAsync(System.Reflection.MethodInfo,System.Linq.IQueryable,System.Threading.CancellationToken)
+
ExecuteAsync(System.Reflection.MethodInfo,System.Linq.IQueryable,System.Linq.Expressions.LambdaExpression,System.Threading.CancellationToken)
+
ExecuteAsync(System.Reflection.MethodInfo,System.Linq.IQueryable,System.Linq.Expressions.Expression,System.Threading.CancellationToken)
+
GetMethod(System.String,System.Int32,System.Func`2<System.Reflection.MethodInfo,System.Boolean>)
+
GetMethod(System.String,System.Int32,System.Func`2<System.Reflection.MethodInfo,System.Boolean>)
diff --git a/report/Microsoft.EntityFrameworkCore.DynamicLinq_LinqProviderExtensions.htm b/report/Microsoft.EntityFrameworkCore.DynamicLinq_LinqProviderExtensions.htm
index 7e40024f..5788297a 100644
--- a/report/Microsoft.EntityFrameworkCore.DynamicLinq_LinqProviderExtensions.htm
+++ b/report/Microsoft.EntityFrameworkCore.DynamicLinq_LinqProviderExtensions.htm
@@ -15,7 +15,7 @@ Summary
Class: System.Linq.Dynamic.Core.Extensions.LinqProviderExtensions
Assembly: Microsoft.EntityFrameworkCore.DynamicLinq
-File(s): C:\Users\Stef\Documents\GitHub\System.Linq.Dynamic.Core\src\System.Linq.Dynamic.Core\Extensions\LinqProviderExtensions.cs
+File(s): C:\Users\azureuser\Documents\Github\System.Linq.Dynamic.Core\src\System.Linq.Dynamic.Core\Extensions\LinqProviderExtensions.cs
Covered lines: 0
Uncovered lines: 22
Coverable lines: 22
@@ -33,7 +33,7 @@ Metrics
File(s)
-
+C:\Users\azureuser\Documents\Github\System.Linq.Dynamic.Core\src\System.Linq.Dynamic.Core\Extensions\LinqProviderExtensions.cs
# Line Line coverage
@@ -90,7 +90,7 @@
-
+
Methods/Properties
diff --git a/report/Microsoft.EntityFrameworkCore.DynamicLinq_Res.htm b/report/Microsoft.EntityFrameworkCore.DynamicLinq_Res.htm
index b78971d2..fcfff76d 100644
--- a/report/Microsoft.EntityFrameworkCore.DynamicLinq_Res.htm
+++ b/report/Microsoft.EntityFrameworkCore.DynamicLinq_Res.htm
@@ -25,6 +25,6 @@
Summary
File(s)
No files found. This usually happens if a file isn't covered by a test or the class does not contain any sequence points (e.g. a class that only contains auto properties).
-
+