Ejemplo n.º 1
0
    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;
        }
    }
Ejemplo n.º 2
0
    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;
        }
    }
Ejemplo n.º 3
0
    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;
        }
    }