Skip to content

Commit 7046f5b

Browse files
authored
Merge pull request #12 from sj-distributor/dotnet7
Upgrade to dotnet 7.0
2 parents e4459de + e5cf6e5 commit 7046f5b

File tree

11 files changed

+18
-35
lines changed

11 files changed

+18
-35
lines changed

.github/workflows/dotnet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Setup .NET
2020
uses: actions/setup-dotnet@v3
2121
with:
22-
dotnet-version: 6.0.x
22+
dotnet-version: 7.0.x
2323
- name: Restore dependencies
2424
run: dotnet restore
2525
- name: Build

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![.NET](https://github.com/sj-distributor/Wax/actions/workflows/dotnet.yml/badge.svg)](https://github.com/sj-distributor/Wax/actions/workflows/dotnet.yml)
44
[![Nuget](https://img.shields.io/nuget/v/Wax.Template)](https://www.nuget.org/packages/Wax.Template)
55

6-
WilTechs Architecture Solution Template for .NET 6
6+
WilTechs Architecture Solution Template for .NET 7
77

88
## Getting Started
99

src/Wax.Api/Wax.Api.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.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
</PropertyGroup>
77

@@ -10,8 +10,8 @@
1010
<PackageReference Include="Serilog.Enrichers.CorrelationId" Version="3.0.1" />
1111
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
1212
<PackageReference Include="Serilog.Sinks.Seq" Version="5.2.2" />
13-
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
14-
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.4.0" />
13+
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
14+
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.5.0" />
1515
</ItemGroup>
1616

1717
<ItemGroup>

src/Wax.Core/ApplicationModule.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public ApplicationModule(ILogger logger, ICurrentUser currentUser, IConfiguratio
3939

4040
protected override void Load(ContainerBuilder builder)
4141
{
42+
RegisterSettings(builder);
4243
RegisterAutoMapper(builder);
4344
RegisterDependency(builder);
4445
RegisterDatabase(builder);

src/Wax.Core/Handlers/CommandHandlers/Customers/CreateCustomerCommandHandler.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ public class CreateCustomerCommandHandler : ICommandHandler<CreateCustomerComman
1313
{
1414
private readonly IMapper _mapper;
1515
private readonly ICustomerRepository _customerRepository;
16-
private readonly IUnitOfWork _unitOfWork;
1716

1817
public CreateCustomerCommandHandler(IMapper mapper,ICustomerRepository customerRepository)
1918
{

src/Wax.Core/Wax.Core.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">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
</PropertyGroup>
77

@@ -11,12 +11,12 @@
1111

1212
<ItemGroup>
1313
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
14-
<PackageReference Include="AutoMapper.Contrib.Autofac.DependencyInjection" Version="6.1.0" />
14+
<PackageReference Include="AutoMapper.Contrib.Autofac.DependencyInjection" Version="7.1.0" />
1515
<PackageReference Include="FluentValidation" Version="11.2.2" />
1616
<PackageReference Include="Mediator.Net.Autofac" Version="4.7.0" />
17-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.9" />
18-
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.9" />
19-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
17+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.5" />
18+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.5" />
19+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
2020
<PackageReference Include="Serilog" Version="2.12.0" />
2121
</ItemGroup>
2222

src/Wax.Messages/Wax.Messages.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
</PropertyGroup>
77

tests/Wax.E2ETests/Wax.E2ETests.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
<Nullable>disable</Nullable>
66

77
<IsPackable>false</IsPackable>
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.9" />
11+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.5" />
1212
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
1313
<PackageReference Include="Shouldly" Version="4.1.0" />
1414
<PackageReference Include="xunit" Version="2.4.1" />

tests/Wax.IntegrationTests/IntegrationTestBase.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,6 @@ protected async Task<TR> Run<T, TR>(Func<T, Task<TR>> action, Action<ContainerBu
3434
return await action(dependency);
3535
}
3636

37-
protected async Task<TR> RunWithUnitOfWork<TR>(Func<IUnitOfWork, Task<TR>> action)
38-
{
39-
var uow = _fixture.LifetimeScope.BeginLifetimeScope().Resolve<IUnitOfWork>();
40-
return await action(uow);
41-
}
42-
43-
protected async Task RunWithUnitOfWork(Func<IUnitOfWork, Task> action)
44-
{
45-
var uow = _fixture.LifetimeScope.BeginLifetimeScope().Resolve<IUnitOfWork>();
46-
await action(uow);
47-
}
48-
4937
public void Dispose()
5038
{
5139
_fixture.Cleanup();

tests/Wax.IntegrationTests/Wax.IntegrationTests.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
<Nullable>disable</Nullable>
66

77
<IsPackable>false</IsPackable>
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" />
12-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
11+
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" />
12+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
1313
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
1414
<PackageReference Include="NSubstitute" Version="4.4.0" />
1515
<PackageReference Include="Shouldly" Version="4.1.0" />
@@ -29,11 +29,6 @@
2929
</ItemGroup>
3030

3131
<ItemGroup>
32-
<Content Update="appsettings.json">
33-
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
34-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
35-
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
36-
</Content>
3732
<None Remove="appsettings.json" />
3833
<Content Include="appsettings.json">
3934
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

0 commit comments

Comments
 (0)