Esempio n. 1
0
        public object ToObject(DbValue item, IMember member)
        {
            if (member?.Precision == 4)
            {
                return(DateTimeOffset.FromUnixTimeMilliseconds(item.ToInt64()).UtcDateTime);
            }

            return(DateTimeOffset.FromUnixTimeSeconds(item.ToInt64()).UtcDateTime);
        }
Esempio n. 2
0
        public object ToObject(DbValue item, IMember member)
        {
            var precision = (TimePrecision)(member?.Precision ?? 0);

            switch (precision)
            {
            case TimePrecision.Millisecond: return(DateTimeOffset.FromUnixTimeMilliseconds(item.ToInt64()));

            default: return(DateTimeOffset.FromUnixTimeSeconds(item.ToInt64()));
            }
        }
Esempio n. 3
0
 public object ToObject(DbValue item, IMember member)
 => item.ToInt64();
 public object ToObject(DbValue item, IMember member)
 => DateTimeOffset.FromUnixTimeSeconds(item.ToInt64()).UtcDateTime;