chore: 更新依赖

This commit is contained in:
Argo-Tianyi 2022-01-24 00:47:19 +08:00
parent 65756b458c
commit b4aea5974c
2 changed files with 8 additions and 46 deletions

View File

@ -20,54 +20,16 @@ class BootstrapAdminConventionMapper : ConventionMapper
ti.TableName = pocoType.Name switch ti.TableName = pocoType.Name switch
{ {
"Error" => "Exceptions",
_ => $"{pocoType.Name}s" _ => $"{pocoType.Name}s"
}; };
return ti; return ti;
} }
///// <summary> public override Func<object?, object?> GetFromDbConverter(PropertyInfo targetProperty, Type sourceType) => targetProperty.PropertyType.IsEnum && sourceType == typeof(string)
///// ? new NumberToEnumConverter(targetProperty.PropertyType).ConvertFromDb
///// </summary> : base.GetFromDbConverter(targetProperty, sourceType);
///// <param name="pocoProperty"></param>
///// <returns></returns>
//public override ColumnInfo GetColumnInfo(PropertyInfo pocoProperty) => pocoProperty.DeclaringType?.Name switch
//{
// nameof(Models.User) => GetUserColumnInfo(pocoProperty),
// nameof(Models.Navigation) => GetNavigationColumnInfo(pocoProperty),
// _ => base.GetColumnInfo(pocoProperty)
//};
//private ColumnInfo GetUserColumnInfo(PropertyInfo pocoProperty) public override Func<object?, object?> GetToDbConverter(PropertyInfo targetProperty) => targetProperty.PropertyType.IsEnum
//{ ? new NumberToEnumConverter(targetProperty.PropertyType).ConvertToDb
// var ci = base.GetColumnInfo(pocoProperty); : base.GetToDbConverter(targetProperty);
// var resultColumns = new List<string>
// {
// nameof(Models.User.NewPassword),
// nameof(Models.User.ConfirmPassword),
// nameof(Models.User.Period),
// nameof(Models.User.IsReset)
// };
// ci.ResultColumn = resultColumns.Any(c => c == ci.ColumnName);
// return ci;
//}
//private ColumnInfo GetNavigationColumnInfo(PropertyInfo pocoProperty)
//{
// var ci = base.GetColumnInfo(pocoProperty);
// var resultColumns = new List<string>
// {
// nameof(Models.Navigation.HasChildren)
// };
// ci.ResultColumn = resultColumns.Any(c => c == ci.ColumnName);
// return ci;
//}
//public override Func<object?, object?> GetFromDbConverter(PropertyInfo targetProperty, Type sourceType) => targetProperty.PropertyType.IsEnum && sourceType == typeof(string)
// ? new StringToEnumConverter(targetProperty.PropertyType).ConvertFromDb
// : base.GetFromDbConverter(targetProperty, sourceType);
//public override Func<object?, object?> GetToDbConverter(PropertyInfo targetProperty) => targetProperty.PropertyType.IsEnum
// ? new StringToEnumConverter(targetProperty.PropertyType).ConvertToDb
// : base.GetToDbConverter(targetProperty);
} }

View File

@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<ItemGroup> <ItemGroup>
<PackageReference Include="BootstrapBlazor" Version="6.2.7" /> <PackageReference Include="BootstrapBlazor" Version="6.2.9-beta04" />
<PackageReference Include="Longbow.Security.Cryptography" Version="5.2.0" /> <PackageReference Include="Longbow.Security.Cryptography" Version="5.2.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="6.0.1" /> <PackageReference Include="Microsoft.Data.Sqlite" Version="6.0.1" />
<PackageReference Include="PetaPoco.Extensions" Version="5.2.0" /> <PackageReference Include="PetaPoco.Extensions" Version="6.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>