コード例 #1
0
   public virtual Expression Translate(MemberExpression memberExpression)
   => memberExpression.DoMemberTranslate(nameof(string.Length), typeof(string))
 ? new ExplicitCastExpression(new SqlFunctionExpression("LENGTH", memberExpression.Type, new[] { memberExpression.Expression }), typeof(int))
 : null;
コード例 #2
0
   public virtual Expression Translate(MemberExpression memberExpression)
   => memberExpression.DoMemberTranslate(nameof(DateTime.TimeOfDay), typeof(DateTime))
 ? new ExplicitCastExpression(new SqlFunctionExpression("Time", memberExpression.Type, new[] { memberExpression.Expression }), typeof(DateTime))
 : null;
コード例 #3
0
   public virtual Expression Translate(MemberExpression memberExpression)
   => memberExpression.DoMemberTranslate(nameof(DateTime.Now), typeof(DateTime))
 ? new SqlFunctionExpression("CURRENT TIMESTAMP", memberExpression.Type)
 : null;