Beispiel #1
0
        public SqlTableColumn Build(out ColumnConstraintInfo constraint)
        {
            if (String.IsNullOrEmpty(columnName))
                throw new InvalidOperationException("The name for the column is required");
            if (columnType == null)
                throw new InvalidOperationException("The type for the column is required");

            constraint = constraintInfo;

            return new SqlTableColumn(columnName, columnType) {
                IsNotNull = notNull,
                DefaultExpression = defaultExpression,
                IndexType = indexType,
                IsIdentity = identity
            };
        }
Beispiel #2
0
        public SqlTableColumn Build(out ColumnConstraintInfo constraint)
        {
            if (String.IsNullOrEmpty(columnName))
            {
                throw new InvalidOperationException("The name for the column is required");
            }
            if (columnType == null)
            {
                throw new InvalidOperationException("The type for the column is required");
            }

            constraint = constraintInfo;

            return(new SqlTableColumn(columnName, columnType)
            {
                IsNotNull = notNull,
                DefaultExpression = defaultExpression,
                IndexType = indexType,
                IsIdentity = identity
            });
        }
Beispiel #3
0
 public IColumnBuilder WithConstraint(ColumnConstraintInfo constraint)
 {
     constraintInfo = constraint;
     return(this);
 }
Beispiel #4
0
 public IColumnBuilder WithConstraint(ColumnConstraintInfo constraint)
 {
     constraintInfo = constraint;
     return this;
 }