public UserDataType(ISchemaBase parent) : base(parent, Enums.ObjectType.UserDataType) { Default = new Default(this); Rule = new Rule(this); Dependencys = new List<ObjectDependency>(); }
public void Fill(Database database, string connectionString) { if (database.Options.Ignore.FilterRules) { using (SqlConnection conn = new SqlConnection(connectionString)) { using (SqlCommand command = new SqlCommand(GetSQL(), conn)) { conn.Open(); using (SqlDataReader reader = command.ExecuteReader()) { while (reader.Read()) { Rule item = new Rule(database); item.Id = (int)reader["object_id"]; item.Name = reader["Name"].ToString(); item.Owner = reader["Owner"].ToString(); item.Text = reader["Definition"].ToString(); database.Rules.Add(item); } } } } } }
public new Rule Clone(ISchemaBase parent) { Rule item = new Rule(parent); item.Id = this.Id; item.Name = this.Name; item.Owner = this.Owner; item.Text = this.Text; item.Guid = this.Guid; return item; }
/// <summary> /// Clona el objeto Column en una nueva instancia. /// </summary> public override ISchemaBase Clone(ISchemaBase parent) { var item = new UserDataType(parent) { Name = Name, Id = Id, Owner = Owner, Guid = Guid, AllowNull = AllowNull, Precision = Precision, Scale = Scale, Size = Size, Type = Type, Default = Default.Clone(this), Rule = Rule.Clone(this), Dependencys = Dependencys, IsAssembly = IsAssembly, AssemblyClass = AssemblyClass, AssemblyId = AssemblyId, AssemblyName = AssemblyName }; return(item); }