Skip to content

Commit c75791d

Browse files
authored
Create EF6 preview NuGet (#508)
1 parent 009cb1a commit c75791d

File tree

6 files changed

+203
-1
lines changed

6 files changed

+203
-1
lines changed

System.Linq.Dynamic.Core.sln

+39-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestSLDC.Android", "test-xa
106106
EndProject
107107
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExpressionSample.Android", "test-xamarin\ExpressionSample\ExpressionSample.Android\ExpressionSample.Android.csproj", "{CE0965F5-C4DD-4CAB-94C6-FE260775D2B3}"
108108
EndProject
109-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorWASMExample", "src-blazor\BlazorWASMExample\BlazorWASMExample.csproj", "{3DA1CE3B-D1FB-4CEC-A4A6-22495CC36655}"
109+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWASMExample", "src-blazor\BlazorWASMExample\BlazorWASMExample.csproj", "{3DA1CE3B-D1FB-4CEC-A4A6-22495CC36655}"
110+
EndProject
111+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.EntityFrameworkCore.DynamicLinq.EFCore6", "src\Microsoft.EntityFrameworkCore.DynamicLinq.EFCore6\Microsoft.EntityFrameworkCore.DynamicLinq.EFCore6.csproj", "{D28F6393-B56B-40A2-AF67-E8D669F42546}"
112+
EndProject
113+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp_net5.0_EF6_InMemory", "src-console\ConsoleAppEF6_InMemory\ConsoleApp_net5.0_EF6_InMemory.csproj", "{4CC563F6-5352-4A77-A8C0-DC0D77A71DBB}"
110114
EndProject
111115
Global
112116
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -666,6 +670,38 @@ Global
666670
{3DA1CE3B-D1FB-4CEC-A4A6-22495CC36655}.Release|x64.Build.0 = Release|Any CPU
667671
{3DA1CE3B-D1FB-4CEC-A4A6-22495CC36655}.Release|x86.ActiveCfg = Release|Any CPU
668672
{3DA1CE3B-D1FB-4CEC-A4A6-22495CC36655}.Release|x86.Build.0 = Release|Any CPU
673+
{D28F6393-B56B-40A2-AF67-E8D669F42546}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
674+
{D28F6393-B56B-40A2-AF67-E8D669F42546}.Debug|Any CPU.Build.0 = Debug|Any CPU
675+
{D28F6393-B56B-40A2-AF67-E8D669F42546}.Debug|ARM.ActiveCfg = Debug|Any CPU
676+
{D28F6393-B56B-40A2-AF67-E8D669F42546}.Debug|ARM.Build.0 = Debug|Any CPU
677+
{D28F6393-B56B-40A2-AF67-E8D669F42546}.Debug|x64.ActiveCfg = Debug|Any CPU
678+
{D28F6393-B56B-40A2-AF67-E8D669F42546}.Debug|x64.Build.0 = Debug|Any CPU
679+
{D28F6393-B56B-40A2-AF67-E8D669F42546}.Debug|x86.ActiveCfg = Debug|Any CPU
680+
{D28F6393-B56B-40A2-AF67-E8D669F42546}.Debug|x86.Build.0 = Debug|Any CPU
681+
{D28F6393-B56B-40A2-AF67-E8D669F42546}.Release|Any CPU.ActiveCfg = Release|Any CPU
682+
{D28F6393-B56B-40A2-AF67-E8D669F42546}.Release|Any CPU.Build.0 = Release|Any CPU
683+
{D28F6393-B56B-40A2-AF67-E8D669F42546}.Release|ARM.ActiveCfg = Release|Any CPU
684+
{D28F6393-B56B-40A2-AF67-E8D669F42546}.Release|ARM.Build.0 = Release|Any CPU
685+
{D28F6393-B56B-40A2-AF67-E8D669F42546}.Release|x64.ActiveCfg = Release|Any CPU
686+
{D28F6393-B56B-40A2-AF67-E8D669F42546}.Release|x64.Build.0 = Release|Any CPU
687+
{D28F6393-B56B-40A2-AF67-E8D669F42546}.Release|x86.ActiveCfg = Release|Any CPU
688+
{D28F6393-B56B-40A2-AF67-E8D669F42546}.Release|x86.Build.0 = Release|Any CPU
689+
{4CC563F6-5352-4A77-A8C0-DC0D77A71DBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
690+
{4CC563F6-5352-4A77-A8C0-DC0D77A71DBB}.Debug|Any CPU.Build.0 = Debug|Any CPU
691+
{4CC563F6-5352-4A77-A8C0-DC0D77A71DBB}.Debug|ARM.ActiveCfg = Debug|Any CPU
692+
{4CC563F6-5352-4A77-A8C0-DC0D77A71DBB}.Debug|ARM.Build.0 = Debug|Any CPU
693+
{4CC563F6-5352-4A77-A8C0-DC0D77A71DBB}.Debug|x64.ActiveCfg = Debug|Any CPU
694+
{4CC563F6-5352-4A77-A8C0-DC0D77A71DBB}.Debug|x64.Build.0 = Debug|Any CPU
695+
{4CC563F6-5352-4A77-A8C0-DC0D77A71DBB}.Debug|x86.ActiveCfg = Debug|Any CPU
696+
{4CC563F6-5352-4A77-A8C0-DC0D77A71DBB}.Debug|x86.Build.0 = Debug|Any CPU
697+
{4CC563F6-5352-4A77-A8C0-DC0D77A71DBB}.Release|Any CPU.ActiveCfg = Release|Any CPU
698+
{4CC563F6-5352-4A77-A8C0-DC0D77A71DBB}.Release|Any CPU.Build.0 = Release|Any CPU
699+
{4CC563F6-5352-4A77-A8C0-DC0D77A71DBB}.Release|ARM.ActiveCfg = Release|Any CPU
700+
{4CC563F6-5352-4A77-A8C0-DC0D77A71DBB}.Release|ARM.Build.0 = Release|Any CPU
701+
{4CC563F6-5352-4A77-A8C0-DC0D77A71DBB}.Release|x64.ActiveCfg = Release|Any CPU
702+
{4CC563F6-5352-4A77-A8C0-DC0D77A71DBB}.Release|x64.Build.0 = Release|Any CPU
703+
{4CC563F6-5352-4A77-A8C0-DC0D77A71DBB}.Release|x86.ActiveCfg = Release|Any CPU
704+
{4CC563F6-5352-4A77-A8C0-DC0D77A71DBB}.Release|x86.Build.0 = Release|Any CPU
669705
EndGlobalSection
670706
GlobalSection(SolutionProperties) = preSolution
671707
HideSolutionNode = FALSE
@@ -704,6 +740,8 @@ Global
704740
{85D70423-5800-41E9-B7D5-244AAF051A85} = {ECA5702B-5D32-4888-A34E-9461FC533F23}
705741
{CE0965F5-C4DD-4CAB-94C6-FE260775D2B3} = {ECA5702B-5D32-4888-A34E-9461FC533F23}
706742
{3DA1CE3B-D1FB-4CEC-A4A6-22495CC36655} = {122BC4FA-7563-4E35-9D17-077F16F1629F}
743+
{D28F6393-B56B-40A2-AF67-E8D669F42546} = {DBD7D9B6-FCC7-4650-91AF-E6457573A68F}
744+
{4CC563F6-5352-4A77-A8C0-DC0D77A71DBB} = {7971CAEB-B9F2-416B-966D-2D697C4C1E62}
707745
EndGlobalSection
708746
GlobalSection(ExtensibilityGlobals) = postSolution
709747
SolutionGuid = {94C56722-194E-4B8B-BC23-B3F754E89A20}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net5.0</TargetFramework>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<Compile Include="..\ConsoleAppEF2.0\Database\ProductDynamic.cs" Link="Database\ProductDynamic.cs" />
10+
</ItemGroup>
11+
12+
<ItemGroup>
13+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.0-preview.3.21201.2" />
14+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0-preview.3.21201.2" />
15+
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
16+
</ItemGroup>
17+
18+
<ItemGroup>
19+
<ProjectReference Include="..\..\src\Microsoft.EntityFrameworkCore.DynamicLinq.EFCore6\Microsoft.EntityFrameworkCore.DynamicLinq.EFCore6.csproj" />
20+
</ItemGroup>
21+
22+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
using System.Collections.Generic;
2+
using ConsoleAppEF2.Database;
3+
using Microsoft.EntityFrameworkCore;
4+
using Microsoft.Extensions.Logging;
5+
6+
namespace ConsoleApp_net5_0_EF6_InMemory
7+
{
8+
public class TestContextEF6 : DbContext
9+
{
10+
public static readonly ILoggerFactory MyLoggerFactory = LoggerFactory.Create(builder =>
11+
{
12+
builder
13+
.AddFilter("Default", LogLevel.Debug)
14+
.AddFilter("Microsoft", LogLevel.Debug)
15+
.AddFilter("System", LogLevel.Information)
16+
.AddConsole();
17+
});
18+
19+
public virtual DbSet<ProductDynamic> Products { get; set; }
20+
21+
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
22+
{
23+
optionsBuilder.UseLoggerFactory(MyLoggerFactory); // Warning: Do not create a new ILoggerFactory instance each time
24+
optionsBuilder.EnableSensitiveDataLogging();
25+
26+
optionsBuilder.UseInMemoryDatabase("TestContextEF6");
27+
}
28+
29+
30+
protected override void OnModelCreating(ModelBuilder modelBuilder)
31+
{
32+
modelBuilder
33+
.Entity<ProductDynamic>()
34+
.OwnsOne(typeof(Dictionary<string, object>).Name, x => x.Dict, x =>
35+
{
36+
x.IndexerProperty<string>("Name").IsRequired(false);
37+
//x.IndexerProperty<string>("b").IsRequired(false);
38+
//x.Property<int?>("TestId").IsRequired(false);
39+
});
40+
}
41+
}
42+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Linq.Dynamic.Core;
5+
using System.Text.Json;
6+
using ConsoleAppEF2.Database;
7+
8+
namespace ConsoleApp_net5_0_EF6_InMemory
9+
{
10+
static class Program
11+
{
12+
private readonly static JsonSerializerOptions JsonSerializerOptions = new JsonSerializerOptions { WriteIndented = true };
13+
14+
static void Main(string[] args)
15+
{
16+
using (var context = new TestContextEF6())
17+
{
18+
context.Products.Add(new ProductDynamic { Dict = new Dictionary<string, object> { { "Name", "test" } } });
19+
context.SaveChanges();
20+
}
21+
22+
using (var context = new TestContextEF6())
23+
{
24+
var results = context.Products.Where("Dict.Name == @0", "test");
25+
26+
Console.WriteLine("results = ?");
27+
foreach (var result in results)
28+
{
29+
Console.WriteLine(result.Key + JsonSerializer.Serialize(result.Dict, JsonSerializerOptions));
30+
}
31+
}
32+
}
33+
}
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
2+
<Import Project="../../version.xml" />
3+
4+
<PropertyGroup>
5+
<!--<Version>6.2.$(PatchVersion)</Version>-->
6+
<Version>6.0.0-preview.3.21201.2</Version>
7+
<Description>Dynamic Linq extensions for Microsoft.EntityFrameworkCore which adds Async support</Description>
8+
<AssemblyTitle>Microsoft.EntityFrameworkCore.DynamicLinq</AssemblyTitle>
9+
<Authors>ZZZ Projects;Stef Heyenrath</Authors>
10+
<TargetFrameworks>net5.0</TargetFrameworks>
11+
<DefineConstants>$(DefineConstants);EFCORE;EFCORE_3X;EFDYNAMICFUNCTIONS</DefineConstants>
12+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
13+
<AssemblyName>Microsoft.EntityFrameworkCore.DynamicLinq</AssemblyName>
14+
<AssemblyOriginatorKeyFile>../Microsoft.EntityFrameworkCore.DynamicLinq.EFCore2/Microsoft.EntityFrameworkCore.DynamicLinq.snk</AssemblyOriginatorKeyFile>
15+
<SignAssembly>true</SignAssembly>
16+
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
17+
<PackageTags>system;linq;dynamic;entityframework;core;async</PackageTags>
18+
<PackageReleaseNotes>Bugfixes and new Features. For details see CHANGELOG.md</PackageReleaseNotes>
19+
<PackageProjectUrl>https://dynamic-linq.net/</PackageProjectUrl>
20+
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
21+
<PackageIconUrl>https://zzzprojects.github.io/images/logo/logo-64.png</PackageIconUrl>
22+
<RepositoryType>git</RepositoryType>
23+
<RepositoryUrl>https://github.com/zzzprojects/System.Linq.Dynamic.Core</RepositoryUrl>
24+
<DefaultLanguage>en-us</DefaultLanguage>
25+
<ProjectGuid>{D28F6393-B56B-40A2-AF67-E8D669F42546}</ProjectGuid>
26+
<DebugType>full</DebugType>
27+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
28+
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
29+
<Company>ZZZ Projects</Company>
30+
<Copyright>Copyright © ZZZ Projects</Copyright>
31+
</PropertyGroup>
32+
33+
<PropertyGroup Condition=" '$(buildType)' == 'azure-pipelines-ci' ">
34+
<TargetFrameworks>net5.0</TargetFrameworks>
35+
</PropertyGroup>
36+
37+
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
38+
<!--<IncludeSource>True</IncludeSource>
39+
<IncludeSymbols>True</IncludeSymbols>
40+
<PathMap>$(MSBuildProjectDirectory)=/</PathMap>-->
41+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
42+
</PropertyGroup>
43+
44+
<ItemGroup>
45+
<Compile Include="..\System.Linq.Dynamic.Core\Res.cs" />
46+
<Compile Include="..\System.Linq.Dynamic.Core\Compatibility\*.cs" />
47+
<Compile Include="..\System.Linq.Dynamic.Core\Extensions\*.cs" />
48+
<Compile Include="..\System.Linq.Dynamic.Core\Validation\*.cs" />
49+
<Compile Include="..\Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3\*.cs" />
50+
</ItemGroup>
51+
52+
<ItemGroup>
53+
<ProjectReference Include="..\System.Linq.Dynamic.Core\System.Linq.Dynamic.Core.csproj" />
54+
</ItemGroup>
55+
56+
<ItemGroup>
57+
<PackageReference Include="JetBrains.Annotations" Version="2021.1.0" PrivateAssets="All" />
58+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0-preview.3.21201.2" />
59+
</ItemGroup>
60+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
using System.Runtime.InteropServices;
2+
3+
[assembly: ComVisible(false)]
4+
#if !(WINDOWS_APP || NETSTANDARD2_1)
5+
[assembly: Guid("b467c675-c014-4b55-85b9-9578941d28c8")]
6+
#endif

0 commit comments

Comments
 (0)