C# 클래스 Remotion.Linq.SqlBackend.SqlPreparation.MethodCallTransformers.DateTimeAddMethodCallTransformer

Implements the IMethodCallTransformer interface for the DateTime.Add(TimeSpan) family of methods.

Calls to those methods are represented as calls to the DATEADD SQL function. For DateTime.AddYears and DateTime.AddMonths, we use DATEADD (year, ...) and DATEADD (month, ...) respectively. For the other methods, we convert the given number to whole milliseconds and call DATEADD (millisecond, ...). (Converting to milliseconds directly corresponds to the in-memory behavior. E.g., AddDays (12.5) always adss 12.5 * 24 hours, not respecting DST changes or something like this.)

DateTime.Add only supports constant values, all the other methods also support column values.

상속: IMethodCallTransformer
파일 보기 프로젝트 열기: re-motion/Relinq-SqlBackend 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
SupportedMethods System.Reflection.MethodInfo[]

공개 메소드들

메소드 설명
Transform ( MethodCallExpression methodCallExpression ) : Expression

비공개 메소드들

메소드 설명
AddMilliseconds ( Expression milliseconds, Expression dateTime ) : Expression
AddTicks ( Expression ticks, Expression dateTime ) : Expression
AddTimeSpan ( System.TimeSpan timeSpan, Expression dateTime ) : Expression
AddUnits ( Expression value, string unit, Expression dateTime ) : Expression
AddWithConversion ( Expression value, double factorToMilliseconds, Expression dateTime ) : Expression

메소드 상세

Transform() 공개 메소드

public Transform ( MethodCallExpression methodCallExpression ) : Expression
methodCallExpression System.Linq.Expressions.MethodCallExpression
리턴 System.Linq.Expressions.Expression

프로퍼티 상세

SupportedMethods 공개적으로 정적으로 프로퍼티

public static MethodInfo[],System.Reflection SupportedMethods
리턴 System.Reflection.MethodInfo[]