public void Initialize(dynamic profile, SchemaBase schema) { var column = schema as Column; if ((int)profile.NameMode == (int)NameMode.Pascal) { column.PropertyName = SchemaNameFormatter.Format(profile, column.Name); } else { column.PropertyName = column.Name; } }
public void Initialize(dynamic profile, SchemaBase schema) { var table = schema as Table; var tableName = table.Name; var regx = new Regex(profile.TableRegex); if (regx.IsMatch(tableName)) { tableName = regx.Replace(tableName, ""); } if ((int)profile.NameMode == (int)NameMode.Pascal) { table.ClassName = SchemaNameFormatter.Format(profile, tableName); } else { table.ClassName = tableName; } }
public void Initialize(dynamic profile, SchemaBase schema) { var column = schema as Column; var columnName = column.Name; if (!string.IsNullOrEmpty(profile.ColumeRegex)) { var regx = new Regex(profile.ColumeRegex); if (regx.IsMatch(columnName)) { columnName = regx.Replace(columnName, string.Empty); } } if ((int)profile.NameMode == (int)NameMode.Pascal) { column.PropertyName = SchemaNameFormatter.Format(profile, columnName); } else { column.PropertyName = columnName; } }