/// <summary> /// Loads the column attributes attached to the specified type's properties. /// </summary> /// <param name="mapping"></param> /// <param name="type"></param> protected void LoadColumns(TableMappingSettings tableMapping) { Type type = Type.GetType(tableMapping.EntityName); foreach (ColumnMappingSettings columnMapping in tableMapping.Columns) { this.Columns.Add(new ColumnMapping(columnMapping, type)); } }
public TableMapping(TableMappingSettings tableMapping) : this() { this.Key = tableMapping.Key; this.TableName = tableMapping.TableName; this.SequenceName = tableMapping.SequenceName; this.LoadColumns(tableMapping); this.Initialize(); }