Skip to content

Commit

Permalink
⬆ Update to EF Core 6 and .NET6 (#57)
Browse files Browse the repository at this point in the history
* Bump Microsoft.EntityFrameworkCore from 5.0.8 to 6.0.5 in /TimeSliceNet

Bumps [Microsoft.EntityFrameworkCore](https://github.com/dotnet/efcore) from 5.0.8 to 6.0.5.
- [Release notes](https://github.com/dotnet/efcore/releases)
- [Commits](https://github.com/dotnet/efcore/commits)

---
updated-dependencies:
- dependency-name: Microsoft.EntityFrameworkCore
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump Microsoft.EntityFrameworkCore.Relational in /TimeSliceNet

Bumps [Microsoft.EntityFrameworkCore.Relational](https://github.com/dotnet/efcore) from 5.0.8 to 6.0.5.
- [Release notes](https://github.com/dotnet/efcore/releases)
- [Commits](https://github.com/dotnet/efcore/commits)

---
updated-dependencies:
- dependency-name: Microsoft.EntityFrameworkCore.Relational
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump Microsoft.EntityFrameworkCore.Sqlite in /TimeSliceNet

Bumps [Microsoft.EntityFrameworkCore.Sqlite](https://github.com/dotnet/efcore) from 5.0.8 to 6.0.5.
- [Release notes](https://github.com/dotnet/efcore/releases)
- [Commits](https://github.com/dotnet/efcore/commits)

---
updated-dependencies:
- dependency-name: Microsoft.EntityFrameworkCore.Sqlite
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* ⬆ update to .NET6

* Fix Nullability Issues

* Update unittests_and_coverage.yml

* Update formatter.yml

* Update nuget_package_push.yml

* Update nuget_package_push_prerelease.yml

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
hf-kklein and dependabot[bot] committed May 11, 2022
1 parent 3e11664 commit 8b848b2
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/formatter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Setup .NET 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100
dotnet-version: 6.0.102
- name: Install dotnet-format
run: |
dotnet tool install -g dotnet-format
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nuget_package_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100
dotnet-version: 6.0.102
- uses: olegtarasov/get-tag@v2.1
id: tagTimeslice
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nuget_package_push_prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100
dotnet-version: 6.0.102
- uses: olegtarasov/get-tag@v2.1
id: tagTimeslice
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unittests_and_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@master
with:
dotnet-version: 5.0.100
dotnet-version: 6.0.102
- name: Run Tests
working-directory: ./TimeSliceNet
run: dotnet test --configuration Release
Expand All @@ -22,7 +22,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@master
with:
dotnet-version: 5.0.100
dotnet-version: 6.0.102
- name: Install dependencies
working-directory: ./TimeSliceNet
run: dotnet restore
Expand Down
2 changes: 1 addition & 1 deletion TimeSliceNet/ExampleClasses/ExampleClasses.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Not because it is impossible but to have a clean setup where actual code does not reference unit test code.
-->
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\TimeSliceEntityFrameWorkExtensions\TimeSliceEntityFrameWorkExtensions.csproj" />
Expand Down
12 changes: 6 additions & 6 deletions TimeSliceNet/ExampleWebApplication/ExampleWebApplication.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\ExampleClasses\ExampleClasses.csproj"/>
<ProjectReference Include="..\TimeSliceEntityFrameWorkExtensions\TimeSliceEntityFrameWorkExtensions.csproj"/>
<ProjectReference Include="..\TimeSlice\TimeSlice.csproj"/>
<ProjectReference Include="..\ExampleClasses\ExampleClasses.csproj" />
<ProjectReference Include="..\TimeSliceEntityFrameWorkExtensions\TimeSliceEntityFrameWorkExtensions.csproj" />
<ProjectReference Include="..\TimeSlice\TimeSlice.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.8"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.8"/>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.5" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static class EntityTypeBuilderExtensions
/// <typeparam name="TChildKey"></typeparam>
public static void HasDefaultKeys<TTimeSliceCollection, TPersistableRelation, TPersistableParent, TParentKey, TPersistableChild, TChildKey>(
this EntityTypeBuilder<TTimeSliceCollection> etb,
[NotNull] Expression<Func<TTimeSliceCollection, object>> collectionKeyExpression)
Expression<Func<TTimeSliceCollection, object?>> collectionKeyExpression)
where TTimeSliceCollection : PersistableTimeDependentCollection<TPersistableRelation, TPersistableParent, TParentKey, TPersistableChild, TChildKey>
where TPersistableRelation : class, ITimeSlice, IPersistableRelation<TPersistableParent, TParentKey, TPersistableChild, TChildKey>
where TPersistableParent : class, IHasKey<TParentKey>
Expand Down Expand Up @@ -63,7 +63,7 @@ public static class EntityTypeBuilderExtensions
/// <typeparam name="TChildKey"></typeparam>
public static void HasDefaultKeys<TPersistableRelation, TPersistableParent, TParentKey, TPersistableChild, TChildKey>(
this EntityTypeBuilder<TPersistableRelation> etb,
Expression<Func<TPersistableRelation, object>>? relationKeyExpression = null)
Expression<Func<TPersistableRelation, object?>>? relationKeyExpression = null)
where TPersistableRelation : class, ITimeSlice, IPersistableRelation<TPersistableParent, TParentKey, TPersistableChild, TChildKey>
where TPersistableParent : class, IHasKey<TParentKey>
where TPersistableChild : class, IHasKey<TChildKey>
Expand All @@ -80,4 +80,4 @@ public static class EntityTypeBuilderExtensions
etb.HasIndex(x => new { x.Discriminator, x.ParentId, x.ChildId, x.Start, x.End });
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public static class ModelBuilderExtensions
/// <typeparam name="TChildKey"><see cref="IHasKey{TKey}.Id" /> of <typeparamref name="TPersistableChild" /></typeparam>
public static void SetupCollectionAndRelations<TTimeSliceCollection, TPersistableRelation, TPersistableParent, TParentKey, TPersistableChild, TChildKey>(
this ModelBuilder modelBuilder,
[NotNull] Expression<Func<TTimeSliceCollection, object>> collectionKeyExpression,
Expression<Func<TPersistableRelation, object>>? relationKeyExpression = null)
Expression<Func<TTimeSliceCollection, object?>> collectionKeyExpression,
Expression<Func<TPersistableRelation, object?>>? relationKeyExpression = null)
where TTimeSliceCollection : PersistableTimeDependentCollection<TPersistableRelation, TPersistableParent, TParentKey, TPersistableChild, TChildKey>
where TPersistableRelation : class, ITimeSlice, IPersistableRelation<TPersistableParent, TParentKey, TPersistableChild, TChildKey>
where TPersistableParent : class, IHasKey<TParentKey>
Expand Down Expand Up @@ -149,4 +149,4 @@ public override TChildKey Next(EntityEntry entry)
throw new NotImplementedException($"Generating a default value for {entry?.Entity?.GetType()} is not implemented.");
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<PackageLicense>https://github.com/Hochfrequenz/time_slice_net/blob/main/LICENSE</PackageLicense>
<RepositoryUrl>https://github.com/Hochfrequenz/time_slice_net</RepositoryUrl>
<LangVersion>9</LangVersion>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand All @@ -25,8 +25,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.5" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion TimeSliceNet/TimeSliceTests/TimeSliceTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down

0 comments on commit 8b848b2

Please sign in to comment.