예제 #1
0
 public Validator(CheckConstraintAttribute checkAttribute, Model model, _Boolean condition)
 {
     _checkAttribute = checkAttribute;
     Model           = model;
     SourceColumns   = GetSourceColumns(condition);
     _condition      = condition;
 }
예제 #2
0
 internal CaseExpression <TResult> WhenThen(_Boolean when, Column <TResult> then)
 {
     Debug.Assert(!object.ReferenceEquals(when, null));
     Debug.Assert(then != null);
     _when.Add(when);
     _then.Add(then);
     return(this);
 }
예제 #3
0
 /// <summary>
 /// Construct CASE WHEN expression.
 /// </summary>
 /// <param name="when">The condition.</param>
 /// <returns>The result.</returns>
 public CaseWhen <TResult> When(_Boolean when)
 {
     when.VerifyNotNull(nameof(when));
     return(new CaseWhen <TResult>(this, when));
 }
예제 #4
0
 internal CaseWhen(_Boolean when)
 {
     _when = when;
 }
예제 #5
0
            private static IColumns GetSourceColumns(_Boolean condition)
            {
                var expression = condition.Expression;

                return(expression == null ? Columns.Empty : expression.BaseColumns);
            }