﻿using System;
using System.Linq.Expressions;
using Abp.Timing;
using JetBrains.Annotations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

namespace Abp.EntityFrameworkCore.ValueConverters
{
    public class AbpDateTimeValueConverter : ValueConverter<DateTime?, DateTime?>
    {
        public AbpDateTimeValueConverter([CanBeNull] ConverterMappingHints mappingHints = default)
            : base(Normalize, Normalize, mappingHints)
        {
        }

        private static readonly Expression<Func<DateTime?, DateTime?>> Normalize = x =>
            x.HasValue ? Clock.Normalize(x.Value) : x;
    }
}
﻿using System;
using System.Linq.Expressions;
using Abp.Timing;
using JetBrains.Annotations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

namespace Abp.EntityFrameworkCore.ValueConverters
{
    public class AbpDateTimeValueConverter : ValueConverter<DateTime?, DateTime?>
    {
        public AbpDateTimeValueConverter([CanBeNull] ConverterMappingHints mappingHints = null)
            : base(Normalize, Normalize, mappingHints)
        {
        }

        private static readonly Expression<Func<DateTime?, DateTime?>> Normalize = x =>
            x.HasValue ? Clock.Normalize(x.Value) : x;
    }
}
Change the default value of the parameter initialization method.
Change the default value of the parameter initialization method.

