I'd like to utilize new Sql datetime2
data type for event logging (as standard datetime has lower precision than System.DateTime
causing data loss on storing) but when i generate the code with sqlmetal.exe
i get the following warning:
db.dbml(98) : Warning DBML1008: Mapping between DbType 'DateTime2(7) NOT NULL' and Type 'System.DateTime' in Column 'CreatedOn' of Type 'Event' may cause data loss when loading from the database.
The warning disappears if i change my column definition to datetime2(2)
but 2 digits precision is lower than System.DateTime
can handle, right? Why? How can i suppress the warning?