/// <summary>
        /// Adds a Column to be created
        /// </summary>
        /// <param name="name">Column name to be added</param>
        /// <returns>IColumnOptions to restrict chaining</returns>
        public IColumnOptions AddColumn(string name)
        {
            if (string.IsNullOrEmpty(name))
                throw new ArgumentNullException("name");
            if (string.IsNullOrEmpty(_currentTable))
                throw new ArgumentException("missing referenced table");

            IFluentColumn column = new FluentColumn(name);
            _currentColumn = column;

            _exprs.Add(new AddColumnExpression(_currentTable, column));
            return this;
        }
Example #2
0
        /// <summary>
        /// Adds a Column to be created
        /// </summary>
        /// <param name="name">Column name to be added</param>
        /// <returns>IColumnOptions to restrict chaining</returns>
        public IColumnOptions AddColumn(string name)
        {
            if (string.IsNullOrEmpty(name))
            {
                throw new ArgumentNullException("name");
            }
            if (string.IsNullOrEmpty(_currentTable))
            {
                throw new ArgumentException("missing referenced table");
            }

            IFluentColumn column = new FluentColumn(name);

            _currentColumn = column;

            _exprs.Add(new AddColumnExpression(_currentTable, column));
            return(this);
        }