Configuring precision after changing the column type is a NOOP:
modelBuilder
.Entity<Order>()
.Property(e => e.Date)
.HasColumnType("datetime2")
.HasPrecision(6)
***Original repro:
The convention below should set the default precision for all datetime objects in the model to 6 but currently it is a NOP. The other overload is .HasPrecision(byte, byte) and using this instead has the same behavior.
Convention:
modelBuilder.Properties<DateTime>()
.Configure(c => c
.HasPrecision(6));
modelBuilder
.Entity<Order>()
.Property(e => e.Date)
.HasColumnType("datetime2")
.HasPrecision(6)
***Original repro:
The convention below should set the default precision for all datetime objects in the model to 6 but currently it is a NOP. The other overload is .HasPrecision(byte, byte) and using this instead has the same behavior.
Convention:
modelBuilder.Properties<DateTime>()
.Configure(c => c
.HasPrecision(6));