diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeHelper.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeHelper.cs index 06d2ee885b..8a67d20b31 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeHelper.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeHelper.cs @@ -176,6 +176,10 @@ public static class TypeHelper type == typeof(decimal) || type == typeof(DateTime) || type == typeof(DateTimeOffset) || +#if NETCOREAPP + type == typeof(DateOnly) || + type == typeof(TimeOnly) || +#endif type == typeof(TimeSpan) || type == typeof(Guid); } diff --git a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/MethodInvocationValidator.cs b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/MethodInvocationValidator.cs index 1651d9e0dc..f0a34c96c6 100644 --- a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/MethodInvocationValidator.cs +++ b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/MethodInvocationValidator.cs @@ -95,6 +95,7 @@ public class MethodInvocationValidator : IMethodInvocationValidator, ITransientD { var allowNulls = parameterInfo.IsOptional || parameterInfo.IsOut || + TypeHelper.IsNullable(parameterInfo.ParameterType) || TypeHelper.IsPrimitiveExtended(parameterInfo.ParameterType, includeEnums: true); context.Errors.AddRange(