EF Core and datetime2
Posted: Sun 26 Jul 2020 19:04
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
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