Hi,
today I tried to change the precision of datetime2 mappings in an Entity Developer efml model. I woud like to see datetime2(0).
First I entered in the column editor datetime2(0) in the SQL type entry, but that did not change the generated database script.
Then I tried to enter a precision of 0 in the column editor, still no change. The property is generated as datetime2(7).
If I enter a precision of 1..6 or even 8..x then I get datetime2 with the given precision. Greater than seven does not make any sense and the database will complain about. So the precison is taken into account during the script generation. But not 0 precision...
Is it by design or is it a bug (6.8.1039)?
BR Henning
EF Core and datetime2
Re: EF Core and datetime2
Thank you for your report. We will investigate the issue and notify you about the result.
Re: EF Core and datetime2
The bug with picking up Precision=0 for DATETIME2 columns by Update To Database Wizard and Generate Database Script Wizard is fixed: viewtopic.php?f=32&t=42253.