Exemplo n.º 1
0
        public override Expression GenerateCodeLiteral(object value)
        {
            var zonedDateTime = (ZonedDateTime)value;

            return(Expression.New(
                       Constructor,
                       TimestampInstantMapping.GenerateCodeLiteral(zonedDateTime.ToInstant()),
                       Expression.Call(
                           Expression.MakeMemberAccess(
                               null,
                               TzdbDateTimeZoneSourceDefaultMember),
                           ForIdMethod,
                           Expression.Constant(zonedDateTime.Zone.Id))));
        }
Exemplo n.º 2
0
 public override Expression GenerateCodeLiteral(object value)
 => TimestampInstantMapping.GenerateCodeLiteral((Instant)value);