From c8403677c3de2b71d0fd89950a4fd5b9c18be6ea Mon Sep 17 00:00:00 2001 From: Denis TDR Date: Fri, 18 Jul 2025 00:20:24 +0300 Subject: [PATCH] Updates target frameworks and dependencies (net9.0, AutoMapper 15) Updates target frameworks to include net9.0. Updates AutoMapper.Extensions.ExpressionMapping to version 9.0.1 and AutoMapper to version [15.0.1, 16.0.0). --- .../AutoMapper.Collection.EntityFramework.Tests.csproj | 2 +- .../MappingTestBase.cs | 3 ++- .../AutoMapper.Collection.EntityFramework.csproj | 4 ++-- .../MapCollectionWithEqualityThreadSafetyTests.cs | 3 ++- src/AutoMapper.Collection.Tests/MappingTestBase.cs | 3 ++- src/AutoMapper.Collection.Tests/ValueTypeTests.cs | 3 ++- src/AutoMapper.Collection/AutoMapper.Collection.csproj | 4 ++-- 7 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/AutoMapper.Collection.EntityFramework.Tests/AutoMapper.Collection.EntityFramework.Tests.csproj b/src/AutoMapper.Collection.EntityFramework.Tests/AutoMapper.Collection.EntityFramework.Tests.csproj index 0b5a37c..ac6860c 100644 --- a/src/AutoMapper.Collection.EntityFramework.Tests/AutoMapper.Collection.EntityFramework.Tests.csproj +++ b/src/AutoMapper.Collection.EntityFramework.Tests/AutoMapper.Collection.EntityFramework.Tests.csproj @@ -1,7 +1,7 @@  - net8.0 + net8.0;net9.0 AutoMapper.Collection.EntityFramework.Tests false diff --git a/src/AutoMapper.Collection.EntityFramework.Tests/MappingTestBase.cs b/src/AutoMapper.Collection.EntityFramework.Tests/MappingTestBase.cs index 31dbfca..2e91f5f 100644 --- a/src/AutoMapper.Collection.EntityFramework.Tests/MappingTestBase.cs +++ b/src/AutoMapper.Collection.EntityFramework.Tests/MappingTestBase.cs @@ -1,4 +1,5 @@ using System; +using Microsoft.Extensions.Logging.Abstractions; namespace AutoMapper.Collection { @@ -6,7 +7,7 @@ public abstract class MappingTestBase { protected IMapper CreateMapper(Action cfg) { - var map = new MapperConfiguration(cfg); + var map = new MapperConfiguration(cfg, new NullLoggerFactory()); map.CompileMappings(); var mapper = map.CreateMapper(); diff --git a/src/AutoMapper.Collection.EntityFramework/AutoMapper.Collection.EntityFramework.csproj b/src/AutoMapper.Collection.EntityFramework/AutoMapper.Collection.EntityFramework.csproj index 20c1fed..1223da0 100644 --- a/src/AutoMapper.Collection.EntityFramework/AutoMapper.Collection.EntityFramework.csproj +++ b/src/AutoMapper.Collection.EntityFramework/AutoMapper.Collection.EntityFramework.csproj @@ -3,7 +3,7 @@ Collection updating support for EntityFramework with AutoMapper. Extends DBSet<T> with Persist<TDto>().InsertUpdate(dto) and Persist<TDto>().Delete(dto). Will find the matching object and will Insert/Update/Delete. Tyler Carlson - net8.0 + net8.0;net9.0 AutoMapper.Collection.EntityFramework AutoMapper.Collection.EntityFramework icon.png @@ -28,7 +28,7 @@ - + all diff --git a/src/AutoMapper.Collection.Tests/MapCollectionWithEqualityThreadSafetyTests.cs b/src/AutoMapper.Collection.Tests/MapCollectionWithEqualityThreadSafetyTests.cs index 0c87aa5..cff42d6 100644 --- a/src/AutoMapper.Collection.Tests/MapCollectionWithEqualityThreadSafetyTests.cs +++ b/src/AutoMapper.Collection.Tests/MapCollectionWithEqualityThreadSafetyTests.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; +using Microsoft.Extensions.Logging.Abstractions; namespace AutoMapper.Collection { @@ -14,7 +15,7 @@ public async Task Should_Work_When_Initialized_Concurrently() new MapperConfiguration(cfg => { cfg.AddCollectionMappers(); - }); + }, new NullLoggerFactory()); }; var tasks = new List(); for (var i = 0; i < 5; i++) diff --git a/src/AutoMapper.Collection.Tests/MappingTestBase.cs b/src/AutoMapper.Collection.Tests/MappingTestBase.cs index 31dbfca..2e91f5f 100644 --- a/src/AutoMapper.Collection.Tests/MappingTestBase.cs +++ b/src/AutoMapper.Collection.Tests/MappingTestBase.cs @@ -1,4 +1,5 @@ using System; +using Microsoft.Extensions.Logging.Abstractions; namespace AutoMapper.Collection { @@ -6,7 +7,7 @@ public abstract class MappingTestBase { protected IMapper CreateMapper(Action cfg) { - var map = new MapperConfiguration(cfg); + var map = new MapperConfiguration(cfg, new NullLoggerFactory()); map.CompileMappings(); var mapper = map.CreateMapper(); diff --git a/src/AutoMapper.Collection.Tests/ValueTypeTests.cs b/src/AutoMapper.Collection.Tests/ValueTypeTests.cs index cc298da..1cbbf7b 100644 --- a/src/AutoMapper.Collection.Tests/ValueTypeTests.cs +++ b/src/AutoMapper.Collection.Tests/ValueTypeTests.cs @@ -4,6 +4,7 @@ using System.Text; using System.Threading.Tasks; using AutoMapper.EquivalencyExpression; +using Microsoft.Extensions.Logging.Abstractions; using Xunit; namespace AutoMapper.Collection @@ -23,7 +24,7 @@ public void MapValueTypes() c.CreateMap() .EqualityComparison((src, dest) => dest.NationalityCountryId == src); - })); + }, new NullLoggerFactory())); var persons = new[] { diff --git a/src/AutoMapper.Collection/AutoMapper.Collection.csproj b/src/AutoMapper.Collection/AutoMapper.Collection.csproj index b18d7ba..23dabbc 100644 --- a/src/AutoMapper.Collection/AutoMapper.Collection.csproj +++ b/src/AutoMapper.Collection/AutoMapper.Collection.csproj @@ -3,7 +3,7 @@ Collection Add/Remove/Update support for AutoMapper. AutoMapper.Collection adds EqualityComparison Expressions for TypeMaps to determine if Source and Destination type are equivalent to each other when mapping collections. Tyler Carlson - net8.0 + net8.0;net9.0 AutoMapper.Collection AutoMapper.Collection icon.png @@ -24,7 +24,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive