In our C# code, we want to use the DateTimeOffset type, as this preserves the time zone information. (If you use a DateTime to receive the data from the database, it is converted to local time AND THE TIMEZONE IS LOST. We want to keep the time zone offset until we display it, at which time we'll convert to local time.)
How do I get the model to use this data type? Do I have to edit the individual properties?
I tried editing one of the DateTime properties & set it to DateTimeOffset. This didn't work as I got the following message:
Code: Select all
Member Mapping specified is not valid. The type 'Edm.DateTimeOffset[Nullable=False,DefaultValue=,Precision=]' of member 'AlarmTime' in type 'LPRCore.CarSystem.Alarm' is not compatible with 'Devart.Data.PostgreSql.timestamptz[Nullable=False,DefaultValue=,Precision=0]' of member 'AlarmTime' in type 'LPRCore.CarSystem.Store.Alarms'.