Skip to content

Commit 074fb87

Browse files
committed
upgraded to NET 10.0, EF Core 10.0, added optional AutoMapper config action, bumped version to 1.38.0
1 parent 49d53e7 commit 074fb87

File tree

44 files changed

+153
-97
lines changed

Some content is hidden

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

44 files changed

+153
-97
lines changed

.config/dotnet-tools.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"cake.tool": {
6+
"version": "0.38.5",
7+
"commands": [
8+
"dotnet-cake"
9+
]
10+
}
11+
}
12+
}

.idea/.idea.Revo/.idea/.gitignore

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.Revo/.idea/.name

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.Revo/.idea/indexLayout.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.Revo/.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Common.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22

33
<PropertyGroup>
4-
<VersionPrefix>1.37.0</VersionPrefix>
4+
<VersionPrefix>1.38.0</VersionPrefix>
55
</PropertyGroup>
66

77
<PropertyGroup>

Examples/Todos/Revo.Examples.Todos.Tests/Revo.Examples.Todos.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net9.0</TargetFrameworks>
4+
<TargetFrameworks>net10.0</TargetFrameworks>
55
<Configurations>Debug;Release</Configurations>
66
</PropertyGroup>
77

@@ -10,8 +10,8 @@
1010
<PrivateAssets>all</PrivateAssets>
1111
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1212
</PackageReference>
13-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
14-
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.2">
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
14+
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
1515
<PrivateAssets>all</PrivateAssets>
1616
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1717
</PackageReference>

Examples/Todos/Revo.Examples.Todos/Revo.Examples.Todos.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net9.0</TargetFrameworks>
4+
<TargetFrameworks>net10.0</TargetFrameworks>
55
<UserSecretsId>7b56d8f9-dff4-4c46-a824-b2d13b604ad4</UserSecretsId>
66
</PropertyGroup>
77

@@ -16,10 +16,10 @@
1616
</ItemGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.4" />
20-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.4" />
21-
<PackageReference Include="Npgsql" Version="9.0.3" />
22-
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
19+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.0" />
20+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.0" />
21+
<PackageReference Include="Npgsql" Version="10.0.0" />
22+
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.0" />
2323
</ItemGroup>
2424

2525
<ItemGroup>

Extensions/Revo.Extensions.AutoMapper/AutoMapperInitializer.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
using System;
22
using AutoMapper;
33
using AutoMapper.Extensions.ExpressionMapping;
4+
using Microsoft.Extensions.Logging;
45
using Revo.Core.Core;
56
using Revo.Core.Lifecycle;
7+
using Revo.Extensions.AutoMapper.Configuration;
68

79
namespace Revo.Extensions.AutoMapper
810
{
@@ -11,12 +13,14 @@ public class AutoMapperInitializer : IAutoMapperInitializer, IApplicationConfigu
1113
private readonly IAutoMapperProfileDiscovery profileDiscovery;
1214
private readonly Lazy<MapperConfiguration> mapperConfiguration;
1315
private readonly IServiceLocator serviceLocator;
16+
private readonly AutoMapperConfigurationSection configurationSection;
1417

1518
public AutoMapperInitializer(IAutoMapperProfileDiscovery profileDiscovery,
16-
IServiceLocator serviceLocator)
19+
IServiceLocator serviceLocator, AutoMapperConfigurationSection configurationSection)
1720
{
1821
this.profileDiscovery = profileDiscovery;
1922
this.serviceLocator = serviceLocator;
23+
this.configurationSection = configurationSection;
2024

2125
mapperConfiguration = new Lazy<MapperConfiguration>(CreateMapperConfiguration);
2226
}
@@ -51,6 +55,8 @@ private MapperConfiguration CreateMapperConfiguration()
5155
{
5256
configExpression.AddProfile(profile);
5357
}
58+
59+
configurationSection.ConfigureAction?.Invoke(configExpression);
5460
});
5561

5662
return config;

Extensions/Revo.Extensions.AutoMapper/AutoMapperModule.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
using Ninject.Modules;
44
using Revo.Core.Core;
55
using Revo.Core.Lifecycle;
6+
using Revo.Extensions.AutoMapper.Configuration;
67

78
namespace Revo.Extensions.AutoMapper
89
{
910
[AutoLoadModule(false)]
10-
public class AutoMapperModule : NinjectModule
11+
public class AutoMapperModule(AutoMapperConfigurationSection section) : NinjectModule
1112
{
1213
public override void Load()
1314
{
@@ -18,6 +19,9 @@ public override void Load()
1819
Bind<IAutoMapperInitializer, IApplicationConfigurer>()
1920
.To<AutoMapperInitializer>()
2021
.InSingletonScope();
22+
23+
Bind<AutoMapperConfigurationSection>()
24+
.ToConstant(section);
2125

2226
Bind<MapperConfiguration>()
2327
.ToMethod(ctx => ctx.ContextPreservingGet<IAutoMapperInitializer>()

0 commit comments

Comments
 (0)