feat: upgrade solution to net 9
Signed-off-by: Jean Gatto <jean_gatto@hotmail.com>
This commit is contained in:
@@ -13,7 +13,7 @@ on:
|
||||
- "**/*.yml"
|
||||
|
||||
env:
|
||||
DOTNET_VERSION: "8.0.x"
|
||||
DOTNET_VERSION: "9.0.x"
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
||||
|
||||
+36
-35
@@ -18,36 +18,36 @@
|
||||
<PackageVersion Include="CorrelationId" Version="3.0.1" />
|
||||
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
|
||||
<PackageVersion Include="coverlet.msbuild" Version="6.0.2" />
|
||||
<PackageVersion Include="FluentAssertions" Version="6.12.1" />
|
||||
<PackageVersion Include="FluentValidation" Version="11.10.0" />
|
||||
<PackageVersion Include="FluentValidation.DependencyInjectionExtensions" Version="11.10.0" />
|
||||
<PackageVersion Include="FluentAssertions" Version="6.12.2" />
|
||||
<PackageVersion Include="FluentValidation" Version="11.11.0" />
|
||||
<PackageVersion Include="FluentValidation.DependencyInjectionExtensions" Version="11.11.0" />
|
||||
<PackageVersion Include="MediatR" Version="12.4.1" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.10" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.10" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Analyzers" Version="8.0.10" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.10" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.10" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.10" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.10" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.10" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.10" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="8.0.10" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.10" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="8.0.10" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.1" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Http" Version="8.0.1" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Identity.Core" Version="8.0.10" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Options" Version="8.0.2" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Options.DataAnnotations" Version="8.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Primitives" Version="8.0.0" />
|
||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Analyzers" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Http" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Identity.Core" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Options" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Options.DataAnnotations" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Primitives" Version="9.0.0" />
|
||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
|
||||
<PackageVersion Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
|
||||
<PackageVersion Include="MiniProfiler.AspNetCore.Mvc" Version="4.3.8" />
|
||||
<PackageVersion Include="MiniProfiler.EntityFrameworkCore" Version="4.3.8" />
|
||||
@@ -55,18 +55,19 @@
|
||||
<PackageVersion Include="MongoDB.Driver" Version="3.0.0" />
|
||||
<PackageVersion Include="NSubstitute" Version="5.3.0" />
|
||||
<PackageVersion Include="NSubstitute.Analyzers.CSharp" Version="1.0.17" />
|
||||
<PackageVersion Include="OwaspHeaders.Core" Version="8.1.3" />
|
||||
<PackageVersion Include="Polly" Version="8.4.2" />
|
||||
<PackageVersion Include="OwaspHeaders.Core" Version="9.1.1" />
|
||||
<PackageVersion Include="Polly" Version="8.5.0" />
|
||||
<PackageVersion Include="Roslynator.Analyzers" Version="4.12.9" />
|
||||
<PackageVersion Include="Roslynator.CodeAnalysis.Analyzers" Version="4.12.9" />
|
||||
<PackageVersion Include="Roslynator.CodeFixes" Version="4.12.9" />
|
||||
<PackageVersion Include="Roslynator.Formatting.Analyzers" Version="4.12.9" />
|
||||
<PackageVersion Include="Roslynator.Refactorings" Version="4.12.9" />
|
||||
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.9.0" />
|
||||
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="8.0.1" />
|
||||
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
|
||||
<PackageVersion Include="Swashbuckle.AspNetCore" Version="7.1.0" />
|
||||
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="9.0.0" />
|
||||
<PackageVersion Include="System.Text.Json" Version="9.0.0" />
|
||||
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
|
||||
<PackageVersion Include="xunit" Version="2.9.2" />
|
||||
<PackageVersion Include="xunit.analyzers" Version="1.16.0" />
|
||||
<PackageVersion Include="xunit.analyzers" Version="1.17.0" />
|
||||
<PackageVersion Include="xunit.categories" Version="2.0.8" />
|
||||
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -26,8 +26,8 @@ If you liked this project, learned something, give it a star. Thank you!
|
||||
|
||||
## **Technologies**
|
||||
|
||||
- ASP.NET Core 8
|
||||
- Entity Framework Core 8
|
||||
- ASP.NET Core 9
|
||||
- Entity Framework Core 9
|
||||
- Unit & Integration Tests + xUnit + FluentAssertions
|
||||
- Polly
|
||||
- AutoMapper
|
||||
@@ -73,7 +73,7 @@ docker-compose up --build --abort-on-container-exit --remove-orphans
|
||||
Now just open the url in the browser:
|
||||
|
||||
```csharp
|
||||
http://localhost:5072/swagger/
|
||||
http://localhost:{port}/swagger/
|
||||
```
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ http://localhost:5072/swagger/
|
||||
To access the page with the performance indicators and performance:
|
||||
|
||||
```csharp
|
||||
http://localhost:5072/profiler/results-index
|
||||
http://localhost:{port}/profiler/results-index
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim AS base
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
@@ -10,7 +10,7 @@ ENV DOTNET_NOLOGO=1
|
||||
# Specifies whether data about the .NET tools usage is collected and sent to Microsoft.
|
||||
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim AS build
|
||||
FROM mcr.microsoft.com/dotnet/sdk:9.0-bookworm-slim AS build
|
||||
WORKDIR /src
|
||||
COPY ["Directory.Packages.props", "."]
|
||||
COPY ["Directory.Build.props", "."]
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Shop.Infrastructure.Data.Context;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Shop.PublicApi.Migrations
|
||||
{
|
||||
[DbContext(typeof(WriteDbContext))]
|
||||
[Migration("20241128202054_EF_Update")]
|
||||
partial class EF_Update
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("Latin1_General_CI_AI")
|
||||
.HasAnnotation("ProductVersion", "9.0.0")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Shop.Domain.Entities.CustomerAggregate.Customer", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("DateOfBirth")
|
||||
.HasColumnType("DATE");
|
||||
|
||||
b.Property<string>("FirstName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("varchar(100)");
|
||||
|
||||
b.Property<string>("Gender")
|
||||
.IsRequired()
|
||||
.HasMaxLength(6)
|
||||
.HasColumnType("nvarchar(6)");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("varchar(100)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Customers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Shop.Domain.Entities.CustomerAggregate.Customer", b =>
|
||||
{
|
||||
b.OwnsOne("Shop.Domain.ValueObjects.Email", "Email", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("CustomerId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b1.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasMaxLength(254)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("varchar(254)")
|
||||
.HasColumnName("Email");
|
||||
|
||||
b1.HasKey("CustomerId");
|
||||
|
||||
b1.HasIndex("Address")
|
||||
.IsUnique()
|
||||
.HasFilter("[Email] IS NOT NULL");
|
||||
|
||||
b1.ToTable("Customers");
|
||||
|
||||
b1.WithOwner()
|
||||
.HasForeignKey("CustomerId");
|
||||
});
|
||||
|
||||
b.Navigation("Email");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Shop.PublicApi.Migrations;
|
||||
|
||||
/// <inheritdoc />
|
||||
public partial class EF_Update : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Gender",
|
||||
table: "Customers",
|
||||
type: "nvarchar(6)",
|
||||
maxLength: 6,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(6)",
|
||||
oldUnicode: false,
|
||||
oldMaxLength: 6);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Gender",
|
||||
table: "Customers",
|
||||
type: "varchar(6)",
|
||||
unicode: false,
|
||||
maxLength: 6,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(6)",
|
||||
oldMaxLength: 6);
|
||||
}
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Shop.Infrastructure.Data.Context;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Shop.PublicApi.Migrations.EventStoreDb
|
||||
{
|
||||
[DbContext(typeof(EventStoreDbContext))]
|
||||
[Migration("20241128202230_EF_Update")]
|
||||
partial class EF_Update
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("Latin1_General_CI_AI")
|
||||
.HasAnnotation("ProductVersion", "9.0.0")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Shop.Core.SharedKernel.EventStore", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("AggregateId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Data")
|
||||
.IsRequired()
|
||||
.HasMaxLength(255)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("varchar(255)")
|
||||
.HasComment("JSON serialized event");
|
||||
|
||||
b.Property<string>("MessageType")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("varchar(100)");
|
||||
|
||||
b.Property<DateTime>("OccurredOn")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreatedAt");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("EventStores");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Shop.PublicApi.Migrations.EventStoreDb;
|
||||
|
||||
/// <inheritdoc />
|
||||
public partial class EF_Update : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Data",
|
||||
table: "EventStores",
|
||||
type: "varchar(255)",
|
||||
unicode: false,
|
||||
maxLength: 255,
|
||||
nullable: false,
|
||||
comment: "JSON serialized event",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "VARCHAR(MAX)",
|
||||
oldUnicode: false,
|
||||
oldComment: "JSON serialized event");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Data",
|
||||
table: "EventStores",
|
||||
type: "VARCHAR(MAX)",
|
||||
unicode: false,
|
||||
nullable: false,
|
||||
comment: "JSON serialized event",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(255)",
|
||||
oldUnicode: false,
|
||||
oldMaxLength: 255,
|
||||
oldComment: "JSON serialized event");
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,8 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Shop.Infrastructure.Data.Context;
|
||||
|
||||
#nullable disable
|
||||
@@ -16,12 +18,12 @@ namespace Shop.PublicApi.Migrations.EventStoreDb
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("Latin1_General_CI_AI")
|
||||
.HasAnnotation("ProductVersion", "7.0.3")
|
||||
.HasAnnotation("ProductVersion", "9.0.0")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Shop.Core.Events.EventStore", b =>
|
||||
modelBuilder.Entity("Shop.Core.SharedKernel.EventStore", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
@@ -31,8 +33,9 @@ namespace Shop.PublicApi.Migrations.EventStoreDb
|
||||
|
||||
b.Property<string>("Data")
|
||||
.IsRequired()
|
||||
.HasMaxLength(255)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("VARCHAR(MAX)")
|
||||
.HasColumnType("varchar(255)")
|
||||
.HasComment("JSON serialized event");
|
||||
|
||||
b.Property<string>("MessageType")
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Shop.Infrastructure.Data.Context;
|
||||
|
||||
#nullable disable
|
||||
@@ -16,12 +18,12 @@ namespace Shop.PublicApi.Migrations
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("Latin1_General_CI_AI")
|
||||
.HasAnnotation("ProductVersion", "7.0.2")
|
||||
.HasAnnotation("ProductVersion", "9.0.0")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Shop.Domain.Entities.Customer.Customer", b =>
|
||||
modelBuilder.Entity("Shop.Domain.Entities.CustomerAggregate.Customer", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
@@ -38,8 +40,7 @@ namespace Shop.PublicApi.Migrations
|
||||
b.Property<string>("Gender")
|
||||
.IsRequired()
|
||||
.HasMaxLength(6)
|
||||
.IsUnicode(false)
|
||||
.HasColumnType("varchar(6)");
|
||||
.HasColumnType("nvarchar(6)");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.IsRequired()
|
||||
@@ -52,7 +53,7 @@ namespace Shop.PublicApi.Migrations
|
||||
b.ToTable("Customers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Shop.Domain.Entities.Customer.Customer", b =>
|
||||
modelBuilder.Entity("Shop.Domain.Entities.CustomerAggregate.Customer", b =>
|
||||
{
|
||||
b.OwnsOne("Shop.Domain.ValueObjects.Email", "Email", b1 =>
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<IncludeOpenAPIAnalyzers>true</IncludeOpenAPIAnalyzers>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<UserSecretsId>7d8d0af0-7540-48a6-b160-d34c988a1ad6</UserSecretsId>
|
||||
@@ -61,6 +61,7 @@
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" />
|
||||
<PackageReference Include="System.Text.RegularExpressions" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -76,7 +77,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Remove="D:\.nuget\packages\owaspheaders.core\8.1.0\contentFiles\any\net8.0\README.md" />
|
||||
<Content Remove="D:\.nuget\packages\owaspheaders.core\8.1.0\contentFiles\any\net9.0\README.md" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -10,9 +10,9 @@
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"SqlConnection": "",
|
||||
"NoSqlConnection": "",
|
||||
"CacheConnection": ""
|
||||
"SqlConnection": "Server=shop-sql-server;Integrated Security=true;Initial Catalog=ShopContext;User Id=sa;Password=pMA63033n6tF;Trusted_Connection=false;MultipleActiveResultSets=true;Encrypt=True;TrustServerCertificate=True;",
|
||||
"NoSqlConnection": "mongodb://shop-mongo-server",
|
||||
"CacheConnection": "shop-redis:6379,password=pMA63033n6tF,abortConnect=false"
|
||||
},
|
||||
"CacheOptions": {
|
||||
"AbsoluteExpirationInHours": 2,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -9,4 +9,4 @@ public static class TRequestExtensions
|
||||
{
|
||||
public static HttpContent ToJsonHttpContent<TRequest>(this TRequest request) =>
|
||||
new StringContent(request.ToJson(), Encoding.UTF8, MediaTypeNames.Application.Json);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
<SonarQubeTestProject>True</SonarQubeTestProject>
|
||||
@@ -60,6 +60,7 @@
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Text.RegularExpressions" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
<SonarQubeTestProject>True</SonarQubeTestProject>
|
||||
@@ -57,6 +57,7 @@
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Text.RegularExpressions" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user