public override Expression GenerateCodeLiteral(object value) { var offsetDateTime = (OffsetDateTime)value; var offsetSeconds = offsetDateTime.Offset.Seconds; return(Expression.New(Constructor, TimestampLocalDateTimeMapping.GenerateCodeLiteral(offsetDateTime.LocalDateTime), offsetSeconds % 3600 == 0 ? ConstantCall(OffsetFromHoursMethod, offsetSeconds / 3600) : ConstantCall(OffsetFromSecondsMethod, offsetSeconds))); }
public override Expression GenerateCodeLiteral(object value) { var offsetDateTime = (OffsetDateTime)value; var offsetSeconds = offsetDateTime.Offset.Seconds; return(Expression.New(_ctorInfo, TimestampLocalDateTimeMapping.GenerateCodeLiteral(offsetDateTime.LocalDateTime), offsetSeconds % 3600 == 0 ? ConstantCall(_offsetFactoryMethodInfo1, offsetSeconds / 3600) : ConstantCall(_offsetFactoryMethodInfo2, offsetSeconds))); }