chore: 更新依赖
This commit is contained in:
parent
65756b458c
commit
b4aea5974c
|
@ -20,54 +20,16 @@ class BootstrapAdminConventionMapper : ConventionMapper
|
|||
|
||||
ti.TableName = pocoType.Name switch
|
||||
{
|
||||
"Error" => "Exceptions",
|
||||
_ => $"{pocoType.Name}s"
|
||||
};
|
||||
return ti;
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
/////
|
||||
///// </summary>
|
||||
///// <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)
|
||||
//};
|
||||
public override Func<object?, object?> GetFromDbConverter(PropertyInfo targetProperty, Type sourceType) => targetProperty.PropertyType.IsEnum && sourceType == typeof(string)
|
||||
? new NumberToEnumConverter(targetProperty.PropertyType).ConvertFromDb
|
||||
: base.GetFromDbConverter(targetProperty, sourceType);
|
||||
|
||||
//private ColumnInfo GetUserColumnInfo(PropertyInfo pocoProperty)
|
||||
//{
|
||||
// var ci = base.GetColumnInfo(pocoProperty);
|
||||
// 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);
|
||||
public override Func<object?, object?> GetToDbConverter(PropertyInfo targetProperty) => targetProperty.PropertyType.IsEnum
|
||||
? new NumberToEnumConverter(targetProperty.PropertyType).ConvertToDb
|
||||
: base.GetToDbConverter(targetProperty);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<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="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>
|
||||
|
|
Loading…
Reference in New Issue