示例#1
0
        public void Populate(string name, string sqlTypeAndLength, bool explicitlyDeclared)
        {
            Name             = name;
            SqlTypeAndLength = sqlTypeAndLength;
            string typeOnly;

            if (sqlTypeAndLength.IndexOf('(') > 0)
            {
                typeOnly = sqlTypeAndLength.Substring(0, sqlTypeAndLength.IndexOf('('));
                Length   = int.Parse(sqlTypeAndLength.Substring(sqlTypeAndLength.IndexOf('(') + 1, sqlTypeAndLength.Length - sqlTypeAndLength.IndexOf('(') - 2));
            }
            else
            {
                typeOnly = sqlTypeAndLength;
            }

            string sqlDbType;

            CSType    = map.DBType2CSType(typeOnly, out sqlDbType);
            SqlDbType = sqlDbType;
        }