EF Core and datetime2

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
hfolger
Posts: 1
Joined: Sun 26 Jul 2020 17:00

EF Core and datetime2

Post by hfolger » 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

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: EF Core and datetime2

Post by Shalex » Thu 06 Aug 2020 14:59

Thank you for your report. We will investigate the issue and notify you about the result.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: EF Core and datetime2

Post by Shalex » Mon 21 Sep 2020 15:21

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.

Post Reply