public Validator(CheckConstraintAttribute checkAttribute, Model model, _Boolean condition) { _checkAttribute = checkAttribute; Model = model; SourceColumns = GetSourceColumns(condition); _condition = condition; }
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); }
/// <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)); }
internal CaseWhen(_Boolean when) { _when = when; }
private static IColumns GetSourceColumns(_Boolean condition) { var expression = condition.Expression; return(expression == null ? Columns.Empty : expression.BaseColumns); }