From 314955aba9436df33c6cb6289e2a1a2742596b7e Mon Sep 17 00:00:00 2001 From: Jon P Smith Date: Wed, 2 Feb 2022 11:27:07 +0000 Subject: [PATCH] Version 5.1.1 --- GenericServices/GenericServices.csproj | 10 +++++----- ReleaseNotes.md | 4 ++++ Tests/UnitTests/TestIssues/TestIssue60.cs | 18 ++++++++++++++++++ 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/GenericServices/GenericServices.csproj b/GenericServices/GenericServices.csproj index 330f41d..d62409b 100644 --- a/GenericServices/GenericServices.csproj +++ b/GenericServices/GenericServices.csproj @@ -21,10 +21,10 @@ true - 5.1.0 - 5.1.0 - 5.1.0.0 - 5.1.0.0 + 5.1.1 + 5.1.1 + 5.1.1.0 + 5.1.1.0 Selective Analytics Jon P Smith EfCore.GenericServices @@ -36,7 +36,7 @@ GuHub Entity Framework Core, ASP.NET Core - 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 GenericServicesNuGetIcon128.png MIT diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 0b3b19a..0e914d8 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -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 diff --git a/Tests/UnitTests/TestIssues/TestIssue60.cs b/Tests/UnitTests/TestIssues/TestIssue60.cs index 57060f3..310f962 100644 --- a/Tests/UnitTests/TestIssues/TestIssue60.cs +++ b/Tests/UnitTests/TestIssues/TestIssue60.cs @@ -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 { @@ -49,5 +51,21 @@ public void Test60() var service = new CrudServices(context, utData.ConfigAndMapper); } } + + + [Fact] + public void TestGetEntityTypes() + { + var options = SqliteInMemory.CreateOptions(); + 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()); + } + } } \ No newline at end of file