-
-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix DynamicQueryableExtensions for .NET 6 (#535)
* wip * fix * MethodFinder * version
- Loading branch information
Showing
7 changed files
with
177 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<RootNamespace>ConsoleApp_net6._0</RootNamespace> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\System.Linq.Dynamic.Core\System.Linq.Dynamic.Core.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using System; | ||
using System.Linq; | ||
using System.Linq.Dynamic.Core; | ||
|
||
namespace ConsoleApp_net6._0 | ||
{ | ||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
Normal(); | ||
Dynamic(); | ||
|
||
int y = 0; | ||
} | ||
|
||
private static void Normal() | ||
{ | ||
var e = new int[0].AsQueryable(); | ||
var q = new[] { 1 }.AsQueryable(); | ||
|
||
var a = q.FirstOrDefault(); | ||
var b = e.FirstOrDefault(44); | ||
|
||
var c = q.FirstOrDefault(i => i == 0); | ||
var d = q.FirstOrDefault(i => i == 0, 42); | ||
|
||
var t = q.Take(1); | ||
} | ||
|
||
private static void Dynamic() | ||
{ | ||
var e = new int[0].AsQueryable() as IQueryable; | ||
var q = new[] { 1 }.AsQueryable() as IQueryable; | ||
|
||
var a = q.FirstOrDefault(); | ||
//var b = e.FirstOrDefault(44); | ||
|
||
var c = q.FirstOrDefault("it == 0"); | ||
//var d = q.FirstOrDefault(i => i == 0, 42); | ||
} | ||
} | ||
} |
Oops, something went wrong.