Пример #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
            };
        }
Пример #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
            });
        }
Пример #3
0
 public IColumnBuilder WithConstraint(ColumnConstraintInfo constraint)
 {
     constraintInfo = constraint;
     return(this);
 }
Пример #4
0
 public IColumnBuilder WithConstraint(ColumnConstraintInfo constraint)
 {
     constraintInfo = constraint;
     return this;
 }