public DbColumn(DbColumnType type, string name, bool allowNull = false, bool isPrimaryKey = false) { if (type == null) { throw new ArgumentNullException("type"); } if (name == null) { throw new ArgumentNullException("name"); } this.Name = NameProvider.ToColumnName(name); this.Type = type; this.AllowNull = allowNull; this.IsPrimaryKey = isPrimaryKey; this.DbForeignKey = null; }
public DbForeignKey(string table, string column) { if (table == null) { throw new ArgumentNullException("table"); } if (column == null) { throw new ArgumentNullException("column"); } if (table == string.Empty) { throw new ArgumentOutOfRangeException("table"); } if (column == string.Empty) { throw new ArgumentOutOfRangeException("column"); } this.Table = NameProvider.ToTableName(table); this.Column = NameProvider.ToColumnName(column); }