Skip to content

Commit

Permalink
Merge pull request #12 from sj-distributor/dotnet7
Browse files Browse the repository at this point in the history
Upgrade to dotnet 7.0
  • Loading branch information
linwenda authored Apr 14, 2023
2 parents e4459de + e5cf6e5 commit 7046f5b
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![.NET](https://github.com/sj-distributor/Wax/actions/workflows/dotnet.yml/badge.svg)](https://github.com/sj-distributor/Wax/actions/workflows/dotnet.yml)
[![Nuget](https://img.shields.io/nuget/v/Wax.Template)](https://www.nuget.org/packages/Wax.Template)

WilTechs Architecture Solution Template for .NET 6
WilTechs Architecture Solution Template for .NET 7

## Getting Started

Expand Down
6 changes: 3 additions & 3 deletions src/Wax.Api/Wax.Api.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

Expand All @@ -10,8 +10,8 @@
<PackageReference Include="Serilog.Enrichers.CorrelationId" Version="3.0.1" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.Seq" Version="5.2.2" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.4.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.5.0" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Wax.Core/ApplicationModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public ApplicationModule(ILogger logger, ICurrentUser currentUser, IConfiguratio

protected override void Load(ContainerBuilder builder)
{
RegisterSettings(builder);
RegisterAutoMapper(builder);
RegisterDependency(builder);
RegisterDatabase(builder);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public class CreateCustomerCommandHandler : ICommandHandler<CreateCustomerComman
{
private readonly IMapper _mapper;
private readonly ICustomerRepository _customerRepository;
private readonly IUnitOfWork _unitOfWork;

public CreateCustomerCommandHandler(IMapper mapper,ICustomerRepository customerRepository)
{
Expand Down
10 changes: 5 additions & 5 deletions src/Wax.Core/Wax.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

Expand All @@ -11,12 +11,12 @@

<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="AutoMapper.Contrib.Autofac.DependencyInjection" Version="6.1.0" />
<PackageReference Include="AutoMapper.Contrib.Autofac.DependencyInjection" Version="7.1.0" />
<PackageReference Include="FluentValidation" Version="11.2.2" />
<PackageReference Include="Mediator.Net.Autofac" Version="4.7.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.9" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.5" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageReference Include="Serilog" Version="2.12.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Wax.Messages/Wax.Messages.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions tests/Wax.E2ETests/Wax.E2ETests.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Nullable>disable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.9" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="Shouldly" Version="4.1.0" />
<PackageReference Include="xunit" Version="2.4.1" />
Expand Down
12 changes: 0 additions & 12 deletions tests/Wax.IntegrationTests/IntegrationTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,6 @@ protected async Task<TR> Run<T, TR>(Func<T, Task<TR>> action, Action<ContainerBu
return await action(dependency);
}

protected async Task<TR> RunWithUnitOfWork<TR>(Func<IUnitOfWork, Task<TR>> action)
{
var uow = _fixture.LifetimeScope.BeginLifetimeScope().Resolve<IUnitOfWork>();
return await action(uow);
}

protected async Task RunWithUnitOfWork(Func<IUnitOfWork, Task> action)
{
var uow = _fixture.LifetimeScope.BeginLifetimeScope().Resolve<IUnitOfWork>();
await action(uow);
}

public void Dispose()
{
_fixture.Cleanup();
Expand Down
11 changes: 3 additions & 8 deletions tests/Wax.IntegrationTests/Wax.IntegrationTests.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Nullable>disable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="NSubstitute" Version="4.4.0" />
<PackageReference Include="Shouldly" Version="4.1.0" />
Expand All @@ -29,11 +29,6 @@
</ItemGroup>

<ItemGroup>
<Content Update="appsettings.json">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
<None Remove="appsettings.json" />
<Content Include="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
2 changes: 1 addition & 1 deletion tests/Wax.UnitTests/Wax.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Nullable>disable</Nullable>

<IsPackable>false</IsPackable>
Expand Down

0 comments on commit 7046f5b

Please sign in to comment.