Skip to content

Commit

Permalink
Version 5.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
JonPSmith committed Feb 2, 2022
1 parent f0e210a commit 314955a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
10 changes: 5 additions & 5 deletions GenericServices/GenericServices.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageVersion>5.1.0</PackageVersion>
<Version>5.1.0</Version>
<AssemblyVersion>5.1.0.0</AssemblyVersion>
<FileVersion>5.1.0.0</FileVersion>
<PackageVersion>5.1.1</PackageVersion>
<Version>5.1.1</Version>
<AssemblyVersion>5.1.1.0</AssemblyVersion>
<FileVersion>5.1.1.0</FileVersion>
<Company>Selective Analytics</Company>
<Authors>Jon P Smith</Authors>
<PackageId>EfCore.GenericServices</PackageId>
Expand All @@ -36,7 +36,7 @@
<RepositoryType>GuHub</RepositoryType>
<PackageTags>Entity Framework Core, ASP.NET Core</PackageTags>
<PackageReleaseNotes>
Updated to support both EF Core 5 and EF Core 6
Bug fix: EF Core 6 version failed on owned type because defintion changed - see issue #60
</PackageReleaseNotes>
<PackageIcon>GenericServicesNuGetIcon128.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
4 changes: 4 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes

## 5.1.1

- Bug fix: EF Core 6 version failed on owned type because defintion changed - see issue #60

## 5.1.0

- Updated to support both EF Core 5 and EF Core 6
Expand Down
18 changes: 18 additions & 0 deletions Tests/UnitTests/TestIssues/TestIssue60.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
// Licensed under MIT license. See License.txt in the project root for license information.

using System.ComponentModel.DataAnnotations;
using System.Linq;
using GenericServices.PublicButHidden;
using GenericServices.Setup;
using Microsoft.EntityFrameworkCore;
using TestSupport.EfHelpers;
using Xunit;
using Xunit.Extensions.AssertExtensions;

namespace Tests.UnitTests.TestIssues
{
Expand Down Expand Up @@ -49,5 +51,21 @@ public void Test60()
var service = new CrudServices(context, utData.ConfigAndMapper);
}
}


[Fact]
public void TestGetEntityTypes()
{
var options = SqliteInMemory.CreateOptions<Context>();
using var context = new Context(options);

//ATTEMPT
var ownedTypes = context.Model.GetEntityTypes(typeof(Reference));

//VERIFY
ownedTypes.Count().ShouldEqual(2);
ownedTypes.Select(x => x.ClrType.ShouldBeType<Reference>());
}

}
}

0 comments on commit 314955a

Please sign in to comment.