Ejemplo n.º 1
0
 public Column(string name, DataType dataType, ColumnSize size, Identity identity, bool rowGuidCol, string description, bool fileStream)
     : this(name, dataType, size, Nullable.NotNull, null, rowGuidCol, null, null, description, fileStream)
 {
     if (identity != null)
     {
         Identity = identity;
     }
 }
Ejemplo n.º 2
0
        public Column(string name, DataType dataType, ColumnSize size, Nullable nullable, string collation, bool rowGuidCol,
                      string defaultExpression, string defaultConstraintName, string description, bool fileStream)
        {
            Name     = name;
            DataType = dataType;

            if (size != null)
            {
                Size = size;
            }

            Nullable = nullable;

            if (collation != null)
            {
                Collation = collation;
            }

            RowGuidCol = rowGuidCol;

            if (!IsNullOrEmpty(defaultConstraintName))
            {
                DefaultConstraintName = defaultConstraintName;
            }

            if (!IsNullOrEmpty(defaultExpression))
            {
                // TODO: Once default constraint names on columns becomes mandatory, call EnsureDatabaseConstraintName().
                DefaultExpression = defaultExpression;
            }

            if (description != null)
            {
                Description = description;
            }

            FileStream = fileStream;
        }