Skip to content

Commit 08012ce

Browse files
Merge pull request #115 from simon-reynolds/net6-support
EFCore 6.0 support
2 parents b6cbaf1 + acc5482 commit 08012ce

File tree

95 files changed

+11319
-9234
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+11319
-9234
lines changed

.config/dotnet-tools.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,8 @@
1414
"reportgenerator"
1515
]
1616
},
17-
"fake-cli": {
18-
"version": "5.20.4-alpha.1642",
19-
"commands": [
20-
"fake"
21-
]
22-
},
2317
"paket": {
24-
"version": "6.0.0-beta8",
18+
"version": "6.0.13",
2519
"commands": [
2620
"paket"
2721
]
@@ -37,6 +31,12 @@
3731
"commands": [
3832
"fsharp-analyzers"
3933
]
34+
},
35+
"fantomas-tool": {
36+
"version": "4.5.6",
37+
"commands": [
38+
"fantomas"
39+
]
4040
}
4141
}
4242
}

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ root = true
1111
insert_final_newline = true
1212
indent_style = space
1313
indent_size = 4
14+
end_of_line = lf
1415

1516
[*.{fs,fsi,fsx,config}]
1617
charset = utf-8

.github/workflows/build.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Build master
22

33
on: [push, pull_request]
44

5+
env:
6+
DISABLE_COVERAGE: 1
7+
58
jobs:
69
build:
710
strategy:
@@ -11,14 +14,6 @@ jobs:
1114

1215
steps:
1316
- uses: actions/checkout@v2
14-
- name: Use .NET Core 2.1 SDK
15-
uses: actions/setup-dotnet@v1
16-
with:
17-
dotnet-version: '2.1.x'
18-
- name: Use .NET Core 3.1 SDK
19-
uses: actions/setup-dotnet@v1
20-
with:
21-
dotnet-version: '3.1.x'
2217
# Not specifying a version will attempt to install via global.json
2318
- name: Use .NET Core global.json
2419
uses: actions/setup-dotnet@v1

.paket/Paket.Restore.targets

Lines changed: 71 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
This value should match the version in the props generated by paket
160160
If they differ, this means we need to do a restore in order to ensure correct dependencies
161161
-->
162-
<PropertyGroup Condition="'$(PaketPropsVersion)' != '5.185.3' ">
162+
<PropertyGroup Condition="'$(PaketPropsVersion)' != '6.0.0' ">
163163
<PaketRestoreRequired>true</PaketRestoreRequired>
164164
</PropertyGroup>
165165

@@ -236,13 +236,16 @@
236236
<PackageName>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])</PackageName>
237237
<PackageVersion>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])</PackageVersion>
238238
<AllPrivateAssets>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4])</AllPrivateAssets>
239-
<CopyLocal Condition="'%(PaketReferencesFileLinesInfo.Splits)' == '6'">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5])</CopyLocal>
239+
<CopyLocal Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 6">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5])</CopyLocal>
240+
<OmitContent Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 7">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[6])</OmitContent>
241+
<ImportTargets Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 8">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[7])</ImportTargets>
240242
</PaketReferencesFileLinesInfo>
241243
<PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)">
242244
<Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
243245
<PrivateAssets Condition=" ('%(PaketReferencesFileLinesInfo.AllPrivateAssets)' == 'true') Or ('$(PackAsTool)' == 'true') ">All</PrivateAssets>
244-
<ExcludeAssets Condition=" '%(PaketReferencesFileLinesInfo.Splits)' == '6' And %(PaketReferencesFileLinesInfo.CopyLocal) == 'false'">runtime</ExcludeAssets>
245-
<ExcludeAssets Condition=" '%(PaketReferencesFileLinesInfo.Splits)' != '6' And %(PaketReferencesFileLinesInfo.AllPrivateAssets) == 'exclude'">runtime</ExcludeAssets>
246+
<ExcludeAssets Condition=" %(PaketReferencesFileLinesInfo.CopyLocal) == 'false' or %(PaketReferencesFileLinesInfo.AllPrivateAssets) == 'exclude'">runtime</ExcludeAssets>
247+
<ExcludeAssets Condition=" %(PaketReferencesFileLinesInfo.OmitContent) == 'true'">$(ExcludeAssets);contentFiles</ExcludeAssets>
248+
<ExcludeAssets Condition=" %(PaketReferencesFileLinesInfo.ImportTargets) == 'false'">$(ExcludeAssets);build;buildMultitargeting;buildTransitive</ExcludeAssets>
246249
<Publish Condition=" '$(PackAsTool)' == 'true' ">true</Publish>
247250
<AllowExplicitVersion>true</AllowExplicitVersion>
248251
</PackageReference>
@@ -289,14 +292,16 @@
289292
<PropertyGroup>
290293
<PaketProjectFile>$(MSBuildProjectDirectory)/$(MSBuildProjectFile)</PaketProjectFile>
291294
<ContinuePackingAfterGeneratingNuspec>true</ContinuePackingAfterGeneratingNuspec>
295+
<UseMSBuild16_10_Pack>false</UseMSBuild16_10_Pack>
296+
<UseMSBuild16_10_Pack Condition=" '@(MSBuildMajorVersion)' >= '16' AND '@(MSBuildMinorVersion)' > '10' ">true</UseMSBuild16_10_Pack>
292297
<UseMSBuild16_0_Pack>false</UseMSBuild16_0_Pack>
293-
<UseMSBuild16_0_Pack Condition=" '@(MSBuildMajorVersion)' >= '16' ">true</UseMSBuild16_0_Pack>
298+
<UseMSBuild16_0_Pack Condition=" '@(MSBuildMajorVersion)' >= '16' AND (! $(UseMSBuild16_10_Pack)) ">true</UseMSBuild16_0_Pack>
294299
<UseMSBuild15_9_Pack>false</UseMSBuild15_9_Pack>
295300
<UseMSBuild15_9_Pack Condition=" '@(MSBuildMajorVersion)' == '15' AND '@(MSBuildMinorVersion)' > '8' ">true</UseMSBuild15_9_Pack>
296301
<UseMSBuild15_8_Pack>false</UseMSBuild15_8_Pack>
297-
<UseMSBuild15_8_Pack Condition=" '$(NuGetToolVersion)' != '4.0.0' AND (! $(UseMSBuild15_9_Pack)) AND (! $(UseMSBuild16_0_Pack)) ">true</UseMSBuild15_8_Pack>
302+
<UseMSBuild15_8_Pack Condition=" '$(NuGetToolVersion)' != '4.0.0' AND (! $(UseMSBuild15_9_Pack)) AND (! $(UseMSBuild16_0_Pack)) AND (! $(UseMSBuild16_10_Pack)) ">true</UseMSBuild15_8_Pack>
298303
<UseNuGet4_Pack>false</UseNuGet4_Pack>
299-
<UseNuGet4_Pack Condition=" (! $(UseMSBuild15_8_Pack)) AND (! $(UseMSBuild15_9_Pack)) AND (! $(UseMSBuild16_0_Pack)) ">true</UseNuGet4_Pack>
304+
<UseNuGet4_Pack Condition=" (! $(UseMSBuild15_8_Pack)) AND (! $(UseMSBuild15_9_Pack)) AND (! $(UseMSBuild16_0_Pack)) AND (! $(UseMSBuild16_10_Pack)) ">true</UseNuGet4_Pack>
300305
<AdjustedNuspecOutputPath>$(PaketIntermediateOutputPath)\$(Configuration)</AdjustedNuspecOutputPath>
301306
<AdjustedNuspecOutputPath Condition="@(_NuspecFilesNewLocation) == ''">$(PaketIntermediateOutputPath)</AdjustedNuspecOutputPath>
302307
</PropertyGroup>
@@ -314,6 +319,55 @@
314319
</ConvertToAbsolutePath>
315320

316321
<!-- Call Pack -->
322+
<PackTask Condition="$(UseMSBuild16_10_Pack)"
323+
PackItem="$(PackProjectInputFile)"
324+
PackageFiles="@(_PackageFiles)"
325+
PackageFilesToExclude="@(_PackageFilesToExclude)"
326+
PackageVersion="$(PackageVersion)"
327+
PackageId="$(PackageId)"
328+
Title="$(Title)"
329+
Authors="$(Authors)"
330+
Description="$(Description)"
331+
Copyright="$(Copyright)"
332+
RequireLicenseAcceptance="$(PackageRequireLicenseAcceptance)"
333+
LicenseUrl="$(PackageLicenseUrl)"
334+
ProjectUrl="$(PackageProjectUrl)"
335+
IconUrl="$(PackageIconUrl)"
336+
ReleaseNotes="$(PackageReleaseNotes)"
337+
Tags="$(PackageTags)"
338+
DevelopmentDependency="$(DevelopmentDependency)"
339+
BuildOutputInPackage="@(_BuildOutputInPackage)"
340+
TargetPathsToSymbols="@(_TargetPathsToSymbols)"
341+
SymbolPackageFormat="$(SymbolPackageFormat)"
342+
TargetFrameworks="@(_TargetFrameworks)"
343+
AssemblyName="$(AssemblyName)"
344+
PackageOutputPath="$(PackageOutputAbsolutePath)"
345+
IncludeSymbols="$(IncludeSymbols)"
346+
IncludeSource="$(IncludeSource)"
347+
PackageTypes="$(PackageType)"
348+
IsTool="$(IsTool)"
349+
RepositoryUrl="$(RepositoryUrl)"
350+
RepositoryType="$(RepositoryType)"
351+
SourceFiles="@(_SourceFiles->Distinct())"
352+
NoPackageAnalysis="$(NoPackageAnalysis)"
353+
MinClientVersion="$(MinClientVersion)"
354+
Serviceable="$(Serviceable)"
355+
FrameworkAssemblyReferences="@(_FrameworkAssemblyReferences)"
356+
ContinuePackingAfterGeneratingNuspec="$(ContinuePackingAfterGeneratingNuspec)"
357+
NuspecOutputPath="$(AdjustedNuspecOutputPath)"
358+
IncludeBuildOutput="$(IncludeBuildOutput)"
359+
BuildOutputFolders="$(BuildOutputTargetFolder)"
360+
ContentTargetFolders="$(ContentTargetFolders)"
361+
RestoreOutputPath="$(RestoreOutputAbsolutePath)"
362+
NuspecFile="$(NuspecFileAbsolutePath)"
363+
NuspecBasePath="$(NuspecBasePath)"
364+
NuspecProperties="$(NuspecProperties)"
365+
PackageLicenseFile="$(PackageLicenseFile)"
366+
PackageLicenseExpression="$(PackageLicenseExpression)"
367+
PackageLicenseExpressionVersion="$(PackageLicenseExpressionVersion)"
368+
Readme="$(PackageReadmeFile)"
369+
NoDefaultExcludes="$(NoDefaultExcludes)"/>
370+
317371
<PackTask Condition="$(UseMSBuild16_0_Pack)"
318372
PackItem="$(PackProjectInputFile)"
319373
PackageFiles="@(_PackageFiles)"
@@ -343,6 +397,8 @@
343397
IsTool="$(IsTool)"
344398
RepositoryUrl="$(RepositoryUrl)"
345399
RepositoryType="$(RepositoryType)"
400+
RepositoryBranch="$(RepositoryBranch)"
401+
RepositoryCommit="$(RepositoryCommit)"
346402
SourceFiles="@(_SourceFiles->Distinct())"
347403
NoPackageAnalysis="$(NoPackageAnalysis)"
348404
MinClientVersion="$(MinClientVersion)"
@@ -359,7 +415,8 @@
359415
NuspecProperties="$(NuspecProperties)"
360416
PackageLicenseFile="$(PackageLicenseFile)"
361417
PackageLicenseExpression="$(PackageLicenseExpression)"
362-
PackageLicenseExpressionVersion="$(PackageLicenseExpressionVersion)" />
418+
PackageLicenseExpressionVersion="$(PackageLicenseExpressionVersion)"
419+
NoDefaultExcludes="$(NoDefaultExcludes)" />
363420

364421
<PackTask Condition="$(UseMSBuild15_9_Pack)"
365422
PackItem="$(PackProjectInputFile)"
@@ -390,6 +447,8 @@
390447
IsTool="$(IsTool)"
391448
RepositoryUrl="$(RepositoryUrl)"
392449
RepositoryType="$(RepositoryType)"
450+
RepositoryBranch="$(RepositoryBranch)"
451+
RepositoryCommit="$(RepositoryCommit)"
393452
SourceFiles="@(_SourceFiles->Distinct())"
394453
NoPackageAnalysis="$(NoPackageAnalysis)"
395454
MinClientVersion="$(MinClientVersion)"
@@ -433,6 +492,8 @@
433492
IsTool="$(IsTool)"
434493
RepositoryUrl="$(RepositoryUrl)"
435494
RepositoryType="$(RepositoryType)"
495+
RepositoryBranch="$(RepositoryBranch)"
496+
RepositoryCommit="$(RepositoryCommit)"
436497
SourceFiles="@(_SourceFiles->Distinct())"
437498
NoPackageAnalysis="$(NoPackageAnalysis)"
438499
MinClientVersion="$(MinClientVersion)"
@@ -475,6 +536,8 @@
475536
IsTool="$(IsTool)"
476537
RepositoryUrl="$(RepositoryUrl)"
477538
RepositoryType="$(RepositoryType)"
539+
RepositoryBranch="$(RepositoryBranch)"
540+
RepositoryCommit="$(RepositoryCommit)"
478541
SourceFiles="@(_SourceFiles->Distinct())"
479542
NoPackageAnalysis="$(NoPackageAnalysis)"
480543
MinClientVersion="$(MinClientVersion)"

CHANGELOG.md

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,42 +5,20 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [5.0.3-beta006] - 2021-08-17
8+
## [Unrelease]
99

10-
### Fixed
11-
- Removed `DevelopmentDependency=true` as it was setting `IncludeAssets` to undesirable values when restoring package - https://github.com/efcore/EFCore.FSharp/pull/108
10+
### Added
11+
- Support EF Core 6.0
12+
- Many-to-Many relationships now scaffolded without joining table
13+
- Temporal tables in SQL Server supported
14+
15+
## [5.0.3] - 2021-10-16
1216

17+
### Fixed
1318
- Fix formatting of Nullable parameters - [@LiteracyFanatic](https://github.com/LiteracyFanatic) - https://github.com/efcore/EFCore.FSharp/pull/106
14-
- Handle nullablility correctly in snapshot generation - https://github.com/efcore/EFCore.FSharp/pull/107
15-
- Issues with scaffolded code
16-
- Improved code generation for contexts scaffolded from an existing database - https://github.com/efcore/EFCore.FSharp/pull/89
17-
- Correct issue with InsertData operations and 2D arrays
18-
- Generate valid code in HasData method
19-
- Fix issue with generated DbContext members in scaffolded code
20-
- Resolved issue with migrations have a missing unit arg to the "Up" method if no changes in model
21-
- Foreign Key constraints now created correctly
22-
- Fix indentation issue when table has constraints - https://github.com/efcore/EFCore.FSharp/pull/75
23-
- Constraints now correctly generated - https://github.com/efcore/EFCore.FSharp/pull/72
24-
- Generated Migrations will now always include the System namespace - https://github.com/efcore/EFCore.FSharp/pull/70
25-
- Issues with scaffolded code
26-
- Improved code generation for contexts scaffolded from an existing database - https://github.com/efcore/EFCore.FSharp/pull/89
27-
- Correct issue with InsertData operations and 2D arrays
28-
- Generate valid code in HasData method
29-
- Fix issue with generated DbContext members in scaffolded code
30-
- Resolved issue with migrations have a missing unit arg to the "Up" method if no changes in model
31-
- Foreign Key constraints now created correctly
32-
- Fix indentation issue when table has constraints - https://github.com/efcore/EFCore.FSharp/pull/75
33-
- Constraints now correctly generated - https://github.com/efcore/EFCore.FSharp/pull/72
34-
- Generated Migrations will now always include the System namespace - https://github.com/efcore/EFCore.FSharp/pull/70
35-
[Unreleased]: https://github.com/efcore/EFCore.FSharp/compare/v5.0.3-beta005...HEAD
36-
[5.0.3-beta005]: https://github.com/efcore/EFCore.FSharp/releases/tag/v5.0.3-beta005
3719

3820
### Added
39-
- Single case union support - [@lucasteles](https://github.com/lucasteles) - https://github.com/efcore/EFCore.FSharp/pull/98
40-
- Query translation for Option types - [@lucasteles](https://github.com/lucasteles) - https://github.com/efcore/EFCore.FSharp/pull/93
41-
- DbSet/IQueryable helpers to deal with EF Core async and nullable methods - [@lucasteles](https://github.com/lucasteles) - https://github.com/efcore/EFCore.FSharp/pull/94
42-
- Automatic registration of DesignTimeServices - https://github.com/efcore/EFCore.FSharp/pull/86
43-
- DbContextHelpers - curried functions for interacting with DbContext to allow for a more 'native' F# experience
21+
- Translations for `isNull` to be evaluated in-database - https://github.com/efcore/EFCore.FSharp/pull/114
4422
- Single case union support - [@lucasteles](https://github.com/lucasteles) - https://github.com/efcore/EFCore.FSharp/pull/98
4523
- Query translation for Option types - [@lucasteles](https://github.com/lucasteles) - https://github.com/efcore/EFCore.FSharp/pull/93
4624
- DbSet/IQueryable helpers to deal with EF Core async and nullable methods - [@lucasteles](https://github.com/lucasteles) - https://github.com/efcore/EFCore.FSharp/pull/94

EFCore.FSharp.sln

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "EFCore.FSharp.Tests", "test
1313
EndProject
1414
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "docsTool", "docsTool\docsTool.fsproj", "{8855EC73-F6A1-43D3-AFBC-04A3E09F9BD9}"
1515
EndProject
16+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "build", "build\build.fsproj", "{40D2259D-991D-44C4-B45D-C88CE0710C23}"
17+
EndProject
1618
Global
1719
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1820
Debug|Any CPU = Debug|Any CPU
@@ -62,6 +64,18 @@ Global
6264
{8855EC73-F6A1-43D3-AFBC-04A3E09F9BD9}.Release|x64.Build.0 = Release|Any CPU
6365
{8855EC73-F6A1-43D3-AFBC-04A3E09F9BD9}.Release|x86.ActiveCfg = Release|Any CPU
6466
{8855EC73-F6A1-43D3-AFBC-04A3E09F9BD9}.Release|x86.Build.0 = Release|Any CPU
67+
{40D2259D-991D-44C4-B45D-C88CE0710C23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
68+
{40D2259D-991D-44C4-B45D-C88CE0710C23}.Debug|Any CPU.Build.0 = Debug|Any CPU
69+
{40D2259D-991D-44C4-B45D-C88CE0710C23}.Debug|x64.ActiveCfg = Debug|Any CPU
70+
{40D2259D-991D-44C4-B45D-C88CE0710C23}.Debug|x64.Build.0 = Debug|Any CPU
71+
{40D2259D-991D-44C4-B45D-C88CE0710C23}.Debug|x86.ActiveCfg = Debug|Any CPU
72+
{40D2259D-991D-44C4-B45D-C88CE0710C23}.Debug|x86.Build.0 = Debug|Any CPU
73+
{40D2259D-991D-44C4-B45D-C88CE0710C23}.Release|Any CPU.ActiveCfg = Release|Any CPU
74+
{40D2259D-991D-44C4-B45D-C88CE0710C23}.Release|Any CPU.Build.0 = Release|Any CPU
75+
{40D2259D-991D-44C4-B45D-C88CE0710C23}.Release|x64.ActiveCfg = Release|Any CPU
76+
{40D2259D-991D-44C4-B45D-C88CE0710C23}.Release|x64.Build.0 = Release|Any CPU
77+
{40D2259D-991D-44C4-B45D-C88CE0710C23}.Release|x86.ActiveCfg = Release|Any CPU
78+
{40D2259D-991D-44C4-B45D-C88CE0710C23}.Release|x86.Build.0 = Release|Any CPU
6579
EndGlobalSection
6680
GlobalSection(NestedProjects) = preSolution
6781
{5D30E174-2538-47AC-8443-318C8C5DC2C9} = {C397A34C-84F1-49E7-AEBC-2F9F2B196216}

build.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
echo Restoring dotnet tools...
22
dotnet tool restore
33

4-
dotnet fake build -t %*
4+
dotnet run --project ./build/build.fsproj -- -t %*

0 commit comments

Comments
 (0)