diff --git a/.gitignore b/.gitignore
index 8e6f9f1..c96a87f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,36 +1,236 @@
-*.[Rr]e[Ss]harper
-*[Rr]e[Ss]harper.user
-_[Rr]e[Ss]harper.*/
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
-[Ss]tyle[Cc]op.[Cc]ache
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+# Build results
[Dd]ebug/
+[Dd]ebugPublic/
[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+bld/
[Bb]in/
[Oo]bj/
-[Bb]uild/
-[Dd]ist/
-[Cc]lient[Bb]in/
-[Pp]ublish/
-[Pp]ackages/
+
+# Visual Studio 2015 cache/options directory
.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
-*.suo
-*.sln.cache
-*.user
-*.vssscc
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# DNX
+project.lock.json
+artifacts/
+
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
*.vspscc
-*.[Pp]ublish.xml
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
-[Tt]est[Rr]esults/
-[Tt]est[Rr]esult.xml
+# Chutzpah Test files
+_Chutzpah*
-*.dotCover
-*.ndproj
-/NDependOut
-.idea
-.dbshell
-*.vspx
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+
+# Visual Studio profiler
*.psess
+*.vsp
+*.vspx
+*.sap
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# TODO: Comment the next line if you want to checkin your web deploy settings
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# NuGet Packages
*.nupkg
-*/*.ide/*
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/packages/repositories.config
+# NuGet v3's project.json files produces more ignoreable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Microsoft Azure ApplicationInsights config file
+ApplicationInsights.config
+
+# Windows Store app package directory
+AppPackages/
+BundleArtifacts/
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.pfx
+*.publishsettings
+node_modules/
+orleans.codegen.cs
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+*.mdf
+*.ldf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+
+# FAKE - F# Make
+.fake/
diff --git a/LinqKit Solution.sln b/LinqKit Solution.sln
new file mode 100644
index 0000000..6265b91
--- /dev/null
+++ b/LinqKit Solution.sln
@@ -0,0 +1,81 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.25123.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{2F7F283D-5576-417F-A467-EC210226AC3B}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9FC09568-C879-47D8-9D28-E736B8A84C95}"
+ ProjectSection(SolutionItems) = preProject
+ global.json = global.json
+ README.md = README.md
+ EndProjectSection
+EndProject
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "LinqKit.EntityFramework", "src-dotnet-core\LinqKit.EntityFramework\LinqKit.EntityFramework.xproj", "{CFF0D30F-9AF2-4F3D-8458-167C5CC430FD}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src-original", "src-original", "{BF05142E-19C4-4359-9AAF-7A4EC2F27942}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LinqKit", "src\LinqKit.csproj", "{AEC98F52-83F5-488D-99EF-8AFFE7C9F6E6}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LinqKit.Net35", "src\LinqKit.Net35.csproj", "{E6DA2678-2910-4EA4-B9F8-180E6BFD87B0}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{0BE21A11-8EF0-404B-AFC0-533A62386C4C}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "example", "example", "{4521E792-157C-4049-ADF0-CDA31EFC3CC7}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo", "src\Demo\Demo.csproj", "{AA8FD6A3-D1D1-49B6-8ED4-388E94E4F2F3}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LinqKit.Tests", "src\Tests\LinqKit.Tests.csproj", "{A8A8E0D9-CC31-4B84-9ED2-2B808C9F0B09}"
+EndProject
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "LinqKit.Microsoft.EntityFrameworkCore", "src-dotnet-core\LinqKit.Microsoft.EntityFrameworkCore\LinqKit.Microsoft.EntityFrameworkCore.xproj", "{F9861A91-C2E4-4D20-B486-89272898FE23}"
+EndProject
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "LinqKit", "src-dotnet-core\LinqKit\LinqKit.xproj", "{667345EE-B154-432F-A908-CB6374805C20}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {CFF0D30F-9AF2-4F3D-8458-167C5CC430FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CFF0D30F-9AF2-4F3D-8458-167C5CC430FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CFF0D30F-9AF2-4F3D-8458-167C5CC430FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CFF0D30F-9AF2-4F3D-8458-167C5CC430FD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AEC98F52-83F5-488D-99EF-8AFFE7C9F6E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AEC98F52-83F5-488D-99EF-8AFFE7C9F6E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AEC98F52-83F5-488D-99EF-8AFFE7C9F6E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AEC98F52-83F5-488D-99EF-8AFFE7C9F6E6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E6DA2678-2910-4EA4-B9F8-180E6BFD87B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E6DA2678-2910-4EA4-B9F8-180E6BFD87B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E6DA2678-2910-4EA4-B9F8-180E6BFD87B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E6DA2678-2910-4EA4-B9F8-180E6BFD87B0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AA8FD6A3-D1D1-49B6-8ED4-388E94E4F2F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AA8FD6A3-D1D1-49B6-8ED4-388E94E4F2F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AA8FD6A3-D1D1-49B6-8ED4-388E94E4F2F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AA8FD6A3-D1D1-49B6-8ED4-388E94E4F2F3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A8A8E0D9-CC31-4B84-9ED2-2B808C9F0B09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A8A8E0D9-CC31-4B84-9ED2-2B808C9F0B09}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A8A8E0D9-CC31-4B84-9ED2-2B808C9F0B09}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A8A8E0D9-CC31-4B84-9ED2-2B808C9F0B09}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F9861A91-C2E4-4D20-B486-89272898FE23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F9861A91-C2E4-4D20-B486-89272898FE23}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F9861A91-C2E4-4D20-B486-89272898FE23}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F9861A91-C2E4-4D20-B486-89272898FE23}.Release|Any CPU.Build.0 = Release|Any CPU
+ {667345EE-B154-432F-A908-CB6374805C20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {667345EE-B154-432F-A908-CB6374805C20}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {667345EE-B154-432F-A908-CB6374805C20}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {667345EE-B154-432F-A908-CB6374805C20}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {CFF0D30F-9AF2-4F3D-8458-167C5CC430FD} = {2F7F283D-5576-417F-A467-EC210226AC3B}
+ {AEC98F52-83F5-488D-99EF-8AFFE7C9F6E6} = {BF05142E-19C4-4359-9AAF-7A4EC2F27942}
+ {E6DA2678-2910-4EA4-B9F8-180E6BFD87B0} = {BF05142E-19C4-4359-9AAF-7A4EC2F27942}
+ {AA8FD6A3-D1D1-49B6-8ED4-388E94E4F2F3} = {4521E792-157C-4049-ADF0-CDA31EFC3CC7}
+ {A8A8E0D9-CC31-4B84-9ED2-2B808C9F0B09} = {0BE21A11-8EF0-404B-AFC0-533A62386C4C}
+ {F9861A91-C2E4-4D20-B486-89272898FE23} = {2F7F283D-5576-417F-A467-EC210226AC3B}
+ {667345EE-B154-432F-A908-CB6374805C20} = {2F7F283D-5576-417F-A467-EC210226AC3B}
+ EndGlobalSection
+EndGlobal
diff --git a/README.md b/README.md
index c47b084..ad87f53 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,10 @@
-[![Build status](https://ci.appveyor.com/api/projects/status/github/scottksmith95/LINQKit)](https://ci.appveyor.com/project/Thorium/linqkit)
+[![Build status](https://ci.appveyor.com/api/projects/status/0c4v2bsvdqd57600?svg=true)](https://ci.appveyor.com/project/StefH/system-linq-dynamic-core)
+
+EntityFramework.LinqKit
+[![Version](https://img.shields.io/nuget/v/EntityFramework.LinqKit.svg)](https://www.nuget.org/packages/EntityFramework.LinqKit)
+
+Microsoft.EntityFrameworkCore.LinqKit
+[![Version](https://img.shields.io/nuget/v/Microsoft.EntityFrameworkCore.LinqKit.svg)](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.LinqKit)
What is LINQKit?
=======
diff --git a/global.json b/global.json
new file mode 100644
index 0000000..b51e28b
--- /dev/null
+++ b/global.json
@@ -0,0 +1,6 @@
+{
+ "projects": [ "src", "test" ],
+ "sdk": {
+ "version": "1.0.0-preview1-002702"
+ }
+}
diff --git a/src-dotnet-core/LinqKit.EntityFramework/LinqKit.EntityFramework.xproj b/src-dotnet-core/LinqKit.EntityFramework/LinqKit.EntityFramework.xproj
new file mode 100644
index 0000000..560a3af
--- /dev/null
+++ b/src-dotnet-core/LinqKit.EntityFramework/LinqKit.EntityFramework.xproj
@@ -0,0 +1,21 @@
+
+
+
+ 14.0
+ $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
+
+
+
+
+ cff0d30f-9af2-4f3d-8458-167c5cc430fd
+ LINQKit
+ .\obj
+ .\bin\
+ v4.5.2
+
+
+
+ 2.0
+
+
+
diff --git a/src-dotnet-core/LinqKit.EntityFramework/Properties/AssemblyInfo.cs b/src-dotnet-core/LinqKit.EntityFramework/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..14a4773
--- /dev/null
+++ b/src-dotnet-core/LinqKit.EntityFramework/Properties/AssemblyInfo.cs
@@ -0,0 +1,18 @@
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("LinqKit")]
+[assembly: AssemblyProduct("LinqKit")]
+[assembly: AssemblyTrademark("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("cff0d30f-9af2-4f3d-8458-167c5cc430fd")]
diff --git a/src-dotnet-core/LinqKit.EntityFramework/_build nuget.cmd b/src-dotnet-core/LinqKit.EntityFramework/_build nuget.cmd
new file mode 100644
index 0000000..f642db5
--- /dev/null
+++ b/src-dotnet-core/LinqKit.EntityFramework/_build nuget.cmd
@@ -0,0 +1,3 @@
+dotnet restore
+dotnet pack -c Release project.json
+pause
\ No newline at end of file
diff --git a/src-dotnet-core/LinqKit.EntityFramework/project.json b/src-dotnet-core/LinqKit.EntityFramework/project.json
new file mode 100644
index 0000000..5e080ce
--- /dev/null
+++ b/src-dotnet-core/LinqKit.EntityFramework/project.json
@@ -0,0 +1,82 @@
+{
+ "version": "1.0.0.0",
+ "title": "LinqKit for EntityFramework (with IAsync support)",
+ "description": "LinqKit.EntityFramework is a free set of extensions for LINQ to SQL and Entity Framework power users. (IAsync supported)",
+ "authors": [ "Joseph Albahari", "Tomas Petricek", "Scott Smith", "Stef Heyenrath" ],
+
+ "packOptions": {
+ "summary": "LinqKit.EntityFramework is a free set of extensions for LINQ to SQL and Entity Framework power users. (IAsync supported)",
+ "tags": [ "linq", "EF", "EntityFramework", "Entity", "Framework" ],
+ "owners": [ "Stef Heyenrath" ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/StefH/LINQKit"
+ },
+ "projectUrl": "https://github.com/StefH/LINQKit",
+ "licenseUrl": "https://raw.githubusercontent.com/StefH/LINQKit/master/src/license.txt",
+ "releaseNotes": "dotnet rc2"
+ },
+
+ "buildOptions": {
+ "xmlDoc": true,
+ "define": [ "EF" ],
+ "compile": {
+ "include": [
+ "../../src/*.cs"
+ ]
+ }
+ },
+
+ "dependencies": {
+ "JetBrains.Annotations": {
+ "version": "10.1.4",
+ "type": "build"
+ }
+ },
+
+ "frameworks": {
+ "net35": {
+ "frameworkAssemblies": {
+ }
+ },
+ "net40": {
+ "frameworkAssemblies": {
+ }
+ },
+ "net45": {
+ "frameworkAssemblies": {
+ },
+ "dependencies": {
+ "EntityFramework": "6.1.3"
+ }
+ },
+ "net451": {
+ "frameworkAssemblies": {
+ },
+ "dependencies": {
+ "EntityFramework": "6.1.3"
+ }
+ },
+ "net452": {
+ "frameworkAssemblies": {
+ },
+ "dependencies": {
+ "EntityFramework": "6.1.3"
+ }
+ },
+ "net46": {
+ "frameworkAssemblies": {
+ },
+ "dependencies": {
+ "EntityFramework": "6.1.3"
+ }
+ },
+ "net461": {
+ "frameworkAssemblies": {
+ },
+ "dependencies": {
+ "EntityFramework": "6.1.3"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src-dotnet-core/LinqKit.Microsoft.EntityFrameworkCore/LinqKit.Microsoft.EntityFrameworkCore.xproj b/src-dotnet-core/LinqKit.Microsoft.EntityFrameworkCore/LinqKit.Microsoft.EntityFrameworkCore.xproj
new file mode 100644
index 0000000..6681990
--- /dev/null
+++ b/src-dotnet-core/LinqKit.Microsoft.EntityFrameworkCore/LinqKit.Microsoft.EntityFrameworkCore.xproj
@@ -0,0 +1,19 @@
+
+
+
+ 14.0.25123
+ $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
+
+
+
+ f9861a91-c2e4-4d20-b486-89272898fe23
+ Microsoft.EntityFrameworkCore.LinqKit
+ .\obj
+ .\bin\
+
+
+
+ 2.0
+
+
+
\ No newline at end of file
diff --git a/src-dotnet-core/LinqKit.Microsoft.EntityFrameworkCore/Properties/AssemblyInfo.cs b/src-dotnet-core/LinqKit.Microsoft.EntityFrameworkCore/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..14a4773
--- /dev/null
+++ b/src-dotnet-core/LinqKit.Microsoft.EntityFrameworkCore/Properties/AssemblyInfo.cs
@@ -0,0 +1,18 @@
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("LinqKit")]
+[assembly: AssemblyProduct("LinqKit")]
+[assembly: AssemblyTrademark("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("cff0d30f-9af2-4f3d-8458-167c5cc430fd")]
diff --git a/src-dotnet-core/LinqKit.Microsoft.EntityFrameworkCore/_build nuget.cmd b/src-dotnet-core/LinqKit.Microsoft.EntityFrameworkCore/_build nuget.cmd
new file mode 100644
index 0000000..f642db5
--- /dev/null
+++ b/src-dotnet-core/LinqKit.Microsoft.EntityFrameworkCore/_build nuget.cmd
@@ -0,0 +1,3 @@
+dotnet restore
+dotnet pack -c Release project.json
+pause
\ No newline at end of file
diff --git a/src-dotnet-core/LinqKit.Microsoft.EntityFrameworkCore/project.json b/src-dotnet-core/LinqKit.Microsoft.EntityFrameworkCore/project.json
new file mode 100644
index 0000000..e6a51f1
--- /dev/null
+++ b/src-dotnet-core/LinqKit.Microsoft.EntityFrameworkCore/project.json
@@ -0,0 +1,91 @@
+{
+ "version": "1.0.0.0",
+ "title": "LinqKit for Microsoft.EntityFrameworkCore (with IDbAsync support)",
+ "description": "LinqKit.Microsoft.EntityFrameworkCore is a free set of extensions for LINQ to SQL and EntityFrameworkCore power users. (IDbAsync supported)",
+ "authors": [ "Joseph Albahari", "Tomas Petricek", "Scott Smith", "Stef Heyenrath" ],
+
+ "packOptions": {
+ "summary": "LinqKit.Microsoft.EntityFrameworkCore is a free set of extensions for LINQ to SQL and EntityFrameworkCore power users. (IDbAsync supported)",
+ "tags": [ "linq", "EF", "EntityFramework", "Entity", "Framework", "Core" ],
+ "owners": [ "Stef Heyenrath" ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/StefH/LINQKit"
+ },
+ "projectUrl": "https://github.com/StefH/LINQKit",
+ "licenseUrl": "https://raw.githubusercontent.com/StefH/LINQKit/master/src/license.txt",
+ "releaseNotes": "dotnet rc2"
+ },
+
+ "buildOptions": {
+ "xmlDoc": true,
+ "define": [ "EFCORE" ],
+ "compile": {
+ "include": [
+ "../../src/*.cs"
+ ]
+ }
+ },
+
+ "dependencies": {
+ "JetBrains.Annotations": {
+ "version": "10.1.4",
+ "type": "build"
+ },
+ "Microsoft.EntityFrameworkCore": "1.0.0-rc2-final"
+ },
+
+ "frameworks": {
+ "net451": {
+ "frameworkAssemblies": {
+ }
+ },
+ "net452": {
+ "frameworkAssemblies": {
+ }
+ },
+ "net46": {
+ "frameworkAssemblies": {
+ }
+ },
+ "net461": {
+ "frameworkAssemblies": {
+ }
+ },
+ "dnx451": {
+ "frameworkAssemblies": {
+ }
+ },
+ "netcore50": {
+ "buildOptions": { "define": [ "WINDOWS_APP" ] },
+ "dependencies": {
+ "NETStandard.Library": {
+ "version": "1.5.0-rc2-24027"
+ },
+ "System.Threading.Tasks": "4.0.11-rc2-24027"
+ }
+ },
+ "netstandard1.3": {
+ "buildOptions": { "define": [ "NETSTANDARD" ] },
+ "NETStandard.Library": {
+ "version": "1.5.0-rc2-24027"
+ },
+ "imports": [
+ "portable-win81+wp81",
+ "portable-net45+wp8",
+ "portable-net45+win8+wp8",
+ "portable-wp81+wpa81",
+ "portable-win81+wp81+wpa81",
+ "portable-net45+win8+wpa81+wp8",
+ "portable-net45+win8",
+ "portable-net45+win8+wpa81",
+ "portable-win81+wpa81",
+ "portable-net451+win81",
+ "portable-net451+win81+wpa81"
+ ],
+ "dependencies": {
+ "System.Threading.Tasks": "4.0.11-rc2-24027"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src-dotnet-core/LinqKit/LinqKit.xproj b/src-dotnet-core/LinqKit/LinqKit.xproj
new file mode 100644
index 0000000..927132f
--- /dev/null
+++ b/src-dotnet-core/LinqKit/LinqKit.xproj
@@ -0,0 +1,19 @@
+
+
+
+ 14.0.25123
+ $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
+
+
+
+ 667345ee-b154-432f-a908-cb6374805c20
+ LinqKit
+ .\obj
+ .\bin\
+
+
+
+ 2.0
+
+
+
\ No newline at end of file
diff --git a/src-dotnet-core/LinqKit/Properties/AssemblyInfo.cs b/src-dotnet-core/LinqKit/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..3a077e9
--- /dev/null
+++ b/src-dotnet-core/LinqKit/Properties/AssemblyInfo.cs
@@ -0,0 +1,20 @@
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("LinqKit")]
+[assembly: AssemblyProduct("LinqKit")]
+[assembly: AssemblyTrademark("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+#if !NETSTANDARD
+[assembly: Guid("cff0d30f-9af2-4f3d-8458-167c5cc4aaaa")]
+#endif
\ No newline at end of file
diff --git a/src-dotnet-core/LinqKit/_build nuget.cmd b/src-dotnet-core/LinqKit/_build nuget.cmd
new file mode 100644
index 0000000..f642db5
--- /dev/null
+++ b/src-dotnet-core/LinqKit/_build nuget.cmd
@@ -0,0 +1,3 @@
+dotnet restore
+dotnet pack -c Release project.json
+pause
\ No newline at end of file
diff --git a/src-dotnet-core/LinqKit/project.json b/src-dotnet-core/LinqKit/project.json
new file mode 100644
index 0000000..b76a76c
--- /dev/null
+++ b/src-dotnet-core/LinqKit/project.json
@@ -0,0 +1,116 @@
+{
+ "version": "1.0.0.0",
+ "title": "LinqKit",
+ "description": "LinqKit is a free set of extensions for LINQ to SQL and Entity Framework power users.",
+ "authors": [ "Joseph Albahari", "Tomas Petricek", "Scott Smith", "Stef Heyenrath" ],
+
+ "packOptions": {
+ "summary": "EntityFramework.LinqKit is a free set of extensions for LINQ to SQL and Entity Framework power users.",
+ "tags": [ "linq", "EF", "EntityFramework", "Entity", "Framework" ],
+ "owners": [ "Stef Heyenrath" ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/StefH/LINQKit"
+ },
+ "projectUrl": "https://github.com/StefH/LINQKit",
+ "licenseUrl": "https://raw.githubusercontent.com/StefH/LINQKit/master/src/license.txt",
+ "releaseNotes": "dotnet rc2"
+ },
+
+ "buildOptions": {
+ "xmlDoc": true,
+ "define": [ "NOEF" ],
+ "compile": {
+ "include": [
+ "../../src/*.cs"
+ ]
+ }
+ },
+
+ "dependencies": {
+ "JetBrains.Annotations": {
+ "version": "10.1.4",
+ "type": "build"
+ }
+ },
+
+ "frameworks": {
+ "net35": {
+ "frameworkAssemblies": {
+ }
+ },
+ "net40": {
+ "frameworkAssemblies": {
+ }
+ },
+ "net45": {
+ "frameworkAssemblies": {
+ },
+ "dependencies": {
+ }
+ },
+ "net451": {
+ "frameworkAssemblies": {
+ },
+ "dependencies": {
+ }
+ },
+ "net452": {
+ "frameworkAssemblies": {
+ },
+ "dependencies": {
+ }
+ },
+ "net46": {
+ "frameworkAssemblies": {
+ },
+ "dependencies": {
+ }
+ },
+ "net461": {
+ "frameworkAssemblies": {
+ },
+ "dependencies": {
+ }
+ },
+ "netcore50": {
+ "buildOptions": { "define": [ "WINDOWS_APP" ] },
+ "dependencies": {
+ "NETStandard.Library": {
+ "version": "1.5.0-rc2-24027"
+ },
+ "System.Reflection.Extensions": "4.0.1-rc2-24027",
+ "System.Reflection.TypeExtensions": "4.1.0-rc2-24027",
+ "System.Linq.Queryable": "4.0.1-rc2-24027",
+ "System.Linq.Expressions": "4.0.11-rc2-24027",
+ "System.Threading.Tasks": "4.0.11-rc2-24027"
+ }
+ },
+ "netstandard1.3": {
+ "buildOptions": { "define": [ "NETSTANDARD" ] },
+ "NETStandard.Library": {
+ "version": "1.5.0-rc2-24027"
+ },
+ "imports": [
+ "portable-win81+wp81",
+ "portable-net45+wp8",
+ "portable-net45+win8+wp8",
+ "portable-wp81+wpa81",
+ "portable-win81+wp81+wpa81",
+ "portable-net45+win8+wpa81+wp8",
+ "portable-net45+win8",
+ "portable-net45+win8+wpa81",
+ "portable-win81+wpa81",
+ "portable-net451+win81",
+ "portable-net451+win81+wpa81"
+ ],
+ "dependencies": {
+ "System.Reflection.Extensions": "4.0.1-rc2-24027",
+ "System.Reflection.TypeExtensions": "4.1.0-rc2-24027",
+ "System.Linq.Queryable": "4.0.1-rc2-24027",
+ "System.Linq.Expressions": "4.0.11-rc2-24027",
+ "System.Threading.Tasks": "4.0.11-rc2-24027"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src-dotnet-core/_build nuget.cmd b/src-dotnet-core/_build nuget.cmd
new file mode 100644
index 0000000..d86d3ad
--- /dev/null
+++ b/src-dotnet-core/_build nuget.cmd
@@ -0,0 +1,5 @@
+dotnet restore
+dotnet pack -c Release LinqKit\project.json
+dotnet pack -c Release LinqKit.EntityFramework\project.json
+dotnet pack -c Release LinqKit.Microsoft.EntityFrameworkCore\project.json
+pause
\ No newline at end of file
diff --git a/src/AggregateBalanced.cs b/src/AggregateBalanced.cs
index 1a9883d..aedcf13 100644
--- a/src/AggregateBalanced.cs
+++ b/src/AggregateBalanced.cs
@@ -1,11 +1,5 @@
-using System;
-using System.Reflection;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using System.Runtime.CompilerServices;
+#if !(NET35 || NET40)
using System.Linq.Expressions;
-using System.Linq;
namespace System.Linq
{
@@ -106,4 +100,5 @@ public static async System.Threading.Tasks.Task> AggregateBalanced
}
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/App.config b/src/App.config
index f8df59f..3f770d6 100644
--- a/src/App.config
+++ b/src/App.config
@@ -2,8 +2,8 @@
-
-
+
+
diff --git a/src/ExpandableDbAsyncEnumerator.cs b/src/ExpandableDbAsyncEnumerator.cs
index 3e234d8..7eaa32c 100644
--- a/src/ExpandableDbAsyncEnumerator.cs
+++ b/src/ExpandableDbAsyncEnumerator.cs
@@ -1,16 +1,24 @@
-using System;
+#if !(NET35 || NET40 || NOEF)
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+#if EF
+using System.Data.Entity.Infrastructure;
+#endif
namespace LinqKit
{
- using System.Collections.Generic;
- using System.Data.Entity.Infrastructure;
- using System.Threading;
- using System.Threading.Tasks;
-
/// Class for async-await style list enumeration support (e.g. .ToListAsync())
- public sealed class ExpandableDbAsyncEnumerator : IDbAsyncEnumerator, IDisposable
+ public sealed class ExpandableDbAsyncEnumerator : IDisposable,
+#if EFCORE
+ IAsyncEnumerator
+#else
+ IDbAsyncEnumerator
+#endif
{
private readonly IEnumerator _inner;
+
/// Class for async-await style list enumeration support (e.g. .ToListAsync())
public ExpandableDbAsyncEnumerator(IEnumerator inner)
{
@@ -22,20 +30,31 @@ public void Dispose()
{
_inner.Dispose();
}
+
/// Enumerator-pattern: MoveNext
public Task MoveNextAsync(CancellationToken cancellationToken)
{
return Task.FromResult(_inner.MoveNext());
}
+#if EFCORE
+ public Task MoveNext(CancellationToken cancellationToken)
+ {
+ return Task.FromResult(_inner.MoveNext());
+ }
+#endif
/// Enumerator-pattern: Current item
public T Current
{
get { return _inner.Current; }
}
+
+#if !EFCORE
object IDbAsyncEnumerator.Current
{
get { return Current; }
}
+#endif
}
}
+#endif
\ No newline at end of file
diff --git a/src/ExpandableQuery.cs b/src/ExpandableQuery.cs
index 201010f..54c2979 100644
--- a/src/ExpandableQuery.cs
+++ b/src/ExpandableQuery.cs
@@ -3,11 +3,17 @@
using System.Linq;
using System.Linq.Expressions;
using System.Collections;
-#if !NET35
+
+#if !(NET35 || NET40 || NOEF)
using System.Threading;
+using System.Threading.Tasks;
+#if EFCORE
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Query.Internal;
+#else
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
-using System.Threading.Tasks;
+#endif
#endif
namespace LinqKit
@@ -16,8 +22,10 @@ namespace LinqKit
/// An IQueryable wrapper that allows us to visit the query's expression tree just before LINQ to SQL gets to it.
/// This is based on the excellent work of Tomas Petricek: http://tomasp.net/blog/linq-expand.aspx
///
-#if NET35
- public sealed class ExpandableQuery : IQueryable, IOrderedQueryable, IOrderedQueryable
+#if (NET35 || NET40 || NOEF)
+ public class ExpandableQuery : IQueryable, IOrderedQueryable, IOrderedQueryable
+#elif EFCORE
+ public class ExpandableQuery : IQueryable, IOrderedQueryable, IOrderedQueryable, IAsyncEnumerable
#else
public class ExpandableQuery : IQueryable, IOrderedQueryable, IOrderedQueryable, IDbAsyncEnumerable
#endif
@@ -42,7 +50,16 @@ internal ExpandableQuery(IQueryable inner)
/// IQueryable string presentation.
public override string ToString() { return _inner.ToString(); }
-#if !NET35
+#if !(NET35 || NET40 || NOEF)
+#if EFCORE
+ IAsyncEnumerator IAsyncEnumerable.GetEnumerator()
+ {
+ if (_inner is IAsyncEnumerable)
+ return ((IAsyncEnumerable)_inner).GetEnumerator();
+
+ return (_inner as IAsyncEnumerableAccessor)?.AsyncEnumerable.GetEnumerator();
+ }
+#else
/// Enumerator for async-await
public IDbAsyncEnumerator GetAsyncEnumerator()
{
@@ -54,28 +71,40 @@ public IDbAsyncEnumerator GetAsyncEnumerator()
IDbAsyncEnumerator IDbAsyncEnumerable.GetAsyncEnumerator()
{
- return this.GetAsyncEnumerator();
+ return GetAsyncEnumerator();
}
+#endif
#endif
}
-#if !NET35
+#if !(NET35 || NET40 || NOEF)
internal class ExpandableQueryOfClass : ExpandableQuery
- where T: class
+ where T : class
{
- public ExpandableQueryOfClass(IQueryable inner): base(inner)
+ public ExpandableQueryOfClass(IQueryable inner) : base(inner)
{
}
+#if EFCORE
+ public IQueryable Include(Expression> navigationPropertyPath)
+ {
+ return ((IQueryable)InnerQuery.Include(navigationPropertyPath)).AsExpandable();
+ }
+#else
public IQueryable Include(string path)
{
return InnerQuery.Include(path).AsExpandable();
}
+#endif
}
+#endif
- class ExpandableQueryProvider : IQueryProvider, IDbAsyncQueryProvider
-#else
class ExpandableQueryProvider : IQueryProvider
+#if (NET35 || NET40 || NOEF)
+#elif EFCORE
+ , IAsyncQueryProvider
+#else
+ , IDbAsyncQueryProvider
#endif
{
readonly ExpandableQuery _query;
@@ -108,22 +137,35 @@ object IQueryProvider.Execute(Expression expression)
return _query.InnerQuery.Provider.Execute(expression.Expand());
}
-#if !NET35
- public Task
diff --git a/src/Tests/DbAsyncTest.cs b/src/Tests/DbAsyncTest.cs
index 3c111e2..6a715f7 100644
--- a/src/Tests/DbAsyncTest.cs
+++ b/src/Tests/DbAsyncTest.cs
@@ -1,53 +1,53 @@
-using System;
-using System.Collections.Generic;
-using System.Data.Entity;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-using Xunit;
-
-namespace LinqKit.Tests
-{
- public class DbAsyncTest
- {
- private readonly TestContext db = new TestContext();
-
- public DbAsyncTest()
- {
- db.Entities.RemoveRange(db.Entities.ToList());
- db.Entities.AddRange(new[]
- {
- new Entity { Value = 123.45m },
- new Entity { Value = 67.89m },
- new Entity { Value = 3.14m }
- });
- db.SaveChanges();
- }
-
- [Fact]
- public async Task EnumerateShouldWorkAsync()
- {
- var task = db.Entities.AsExpandable().ToListAsync();
- var before = task.Status;
- var result = await task;
- var after = task.Status;
-
- Assert.Equal(TaskStatus.RanToCompletion, after);
- Assert.Equal(3, result.Count);
- Assert.NotEqual(TaskStatus.RanToCompletion, before);
- }
-
- [Fact]
- public async Task ExecuteShouldWorkAsync()
- {
- var task = db.Entities.AsExpandable().SumAsync(e => e.Value);
- var before = task.Status;
- var result = await task;
- var after = task.Status;
-
- Assert.Equal(TaskStatus.RanToCompletion, after);
- Assert.Equal(194.48m, result, 2);
- Assert.NotEqual(TaskStatus.RanToCompletion, before);
+using System;
+using System.Collections.Generic;
+using System.Data.Entity;
+using System.Linq;
+using System.Linq.Expressions;
+using System.Threading.Tasks;
+using Xunit;
+
+namespace LinqKit.Tests
+{
+ public class DbAsyncTest
+ {
+ private readonly TestContext db = new TestContext();
+
+ public DbAsyncTest()
+ {
+ db.Entities.RemoveRange(db.Entities.ToList());
+ db.Entities.AddRange(new[]
+ {
+ new Entity { Value = 123.45m },
+ new Entity { Value = 67.89m },
+ new Entity { Value = 3.14m }
+ });
+ db.SaveChanges();
+ }
+
+ [Fact]
+ public async Task EnumerateShouldWorkAsync()
+ {
+ var task = db.Entities.AsExpandable().ToListAsync();
+ var before = task.Status;
+ var result = await task;
+ var after = task.Status;
+
+ Assert.Equal(TaskStatus.RanToCompletion, after);
+ Assert.Equal(3, result.Count);
+ Assert.NotEqual(TaskStatus.RanToCompletion, before);
+ }
+
+ [Fact]
+ public async Task ExecuteShouldWorkAsync()
+ {
+ var task = db.Entities.AsExpandable().SumAsync(e => e.Value);
+ var before = task.Status;
+ var result = await task;
+ var after = task.Status;
+
+ Assert.Equal(TaskStatus.RanToCompletion, after);
+ Assert.Equal(194.48m, result, 2);
+ Assert.NotEqual(TaskStatus.RanToCompletion, before);
}
[Fact]
@@ -72,17 +72,17 @@ where combined.Invoke(e)
Assert.Equal(3.14m, res.First().Value);
}
-
- public class TestContext : DbContext
- {
- public DbSet Entities { get; set; }
- }
-
- public class Entity
- {
- public int Id { get; set; }
-
- public decimal Value { get; set; }
- }
- }
-}
+
+ public class TestContext : DbContext
+ {
+ public DbSet Entities { get; set; }
+ }
+
+ public class Entity
+ {
+ public int Id { get; set; }
+
+ public decimal Value { get; set; }
+ }
+ }
+}
diff --git a/src/Tests/LinqKit.Tests.csproj b/src/Tests/LinqKit.Tests.csproj
index 5682fee..727de8a 100644
--- a/src/Tests/LinqKit.Tests.csproj
+++ b/src/Tests/LinqKit.Tests.csproj
@@ -1,5 +1,6 @@
+
@@ -10,7 +11,7 @@
Properties
LinqKit.Tests
LinqKit.Tests
- v4.5.1
+ v4.5.2
512
@@ -35,11 +36,11 @@
- ..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll
+ ..\..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll
True
- ..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll
+ ..\..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll
True
@@ -51,19 +52,19 @@
- ..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll
+ ..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll
True
- ..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll
+ ..\..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll
True
- ..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll
+ ..\..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll
True
- ..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll
+ ..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll
True
@@ -91,7 +92,7 @@
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
+