Beispiel #1
0
        private void GeneratePropertyNode(ColumnBase column)
        {
            //Append Name and Type
            sb.AppendFormat("		<Property Name=\"{0}\" Type=\"{1}\" ", column.DatabaseName, column.EFSqlDatabaseType());

            //Append Nullable
            sb.Append("Nullable=\"" + (column.AllowNull ? "true" : "false") + "\" ");

            //Append MaxLength
            if (!string.IsNullOrEmpty(column.EFGetDatabaseMaxLengthString()))
            {
                sb.AppendFormat("MaxLength=\"{0}\" ", column.EFGetDatabaseMaxLengthString());
            }
            //Append StoreGeneratedPattern
            sb.AppendFormat("StoreGeneratedPattern=\"{0}\" ", column.ToEFStoreGeneratedPattern());

            sb.AppendLine("/>");
        }