Partially updated to .net 10
This commit is contained in:
@@ -8,10 +8,10 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Aspire.Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.0" />
|
||||
<PackageReference Include="Aspire.StackExchange.Redis.OutputCaching" Version="9.0.0" />
|
||||
<PackageReference Include="HopFrame.Web" Version="3.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.0"/>
|
||||
<PackageReference Include="Aspire.Npgsql.EntityFrameworkCore.PostgreSQL" Version="13.0.2" />
|
||||
<PackageReference Include="Aspire.StackExchange.Redis.OutputCaching" Version="13.0.2" />
|
||||
<PackageReference Include="HopFrame.Web" Version="3.2.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.11" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using HopFrame.Core.Config;
|
||||
using HopFrame.Web;
|
||||
using Portfolio.Api;
|
||||
using Portfolio.Api.Services;
|
||||
@@ -31,25 +30,8 @@ builder.Services.AddHopFrame(options => {
|
||||
options.DisplayUserInfo(false);
|
||||
options.AddDbContext<DatabaseContext>(context => {
|
||||
context.Table<Project>(table => {
|
||||
var langConfig = table.InnerConfig.Properties
|
||||
.Single(prop => prop.Name == nameof(Project.Languages));
|
||||
|
||||
langConfig
|
||||
.GetType()!
|
||||
.GetProperty(nameof(PropertyConfig.IsRelation))!
|
||||
.SetValue(langConfig, true);
|
||||
|
||||
langConfig
|
||||
.GetType()!
|
||||
.GetProperty(nameof(PropertyConfig.IsEnumerable))!
|
||||
.SetValue(langConfig, true);
|
||||
|
||||
langConfig
|
||||
.GetType()!
|
||||
.GetProperty(nameof(PropertyConfig.IsRequired))!
|
||||
.SetValue(langConfig, true);
|
||||
|
||||
table.Property(p => p.Languages)
|
||||
.ForceRelation(isEnumerable: true)
|
||||
.FormatEach<Technology>((l, _) => l.Name)
|
||||
.List(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user