Browse Source

Update AbpDbContext.cs

pull/14501/head
maliming 4 years ago
parent
commit
1c4caa2a33
No known key found for this signature in database GPG Key ID: 96224957E51C89E
  1. 2
      framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs

2
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs

@ -627,7 +627,7 @@ public abstract class AbpDbContext<TDbContext> : DbContext, IAbpEfCoreDbContext,
modelBuilder
.Entity<TEntity>()
.Property(property.Name)
.HasConversion(property.PropertyType == typeof(DateTime)
.HasConversion(property.ClrType == typeof(DateTime)
? new AbpDateTimeValueConverter(Clock)
: new AbpNullableDateTimeValueConverter(Clock));
}

Loading…
Cancel
Save